-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Impliment new generic setting tile. (#43)
- Loading branch information
1 parent
ef7b71e
commit 3097dbe
Showing
6 changed files
with
65 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class SettingsTile extends StatelessWidget { | ||
const SettingsTile({ | ||
required this.child, | ||
this.onTap, | ||
Key? key, | ||
}) : super(key: key); | ||
|
||
final Widget child; | ||
final VoidCallback? onTap; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final widget = Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 6.0), | ||
child: child, | ||
); | ||
|
||
return null == onTap | ||
? widget | ||
: InkWell( | ||
onTap: onTap, | ||
child: widget, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters