mirror of
https://github.com/mitchell/selfpass.git
synced 2025-12-14 21:27:22 +00:00
Initial app scaffolding, including flutter files, 3 screens, and 1 widget
This commit is contained in:
parent
3a62efc6cc
commit
cad969d98c
61 changed files with 1691 additions and 0 deletions
35
lib/widgets/tappable_text_list.dart
Normal file
35
lib/widgets/tappable_text_list.dart
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class TappableTextList extends StatelessWidget {
|
||||
final Map<String, GestureTapCallback> tappableText;
|
||||
|
||||
TappableTextList({Key key, this.tappableText}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView(
|
||||
children: _buildListChildren(context),
|
||||
);
|
||||
}
|
||||
|
||||
List<Widget> _buildListChildren(BuildContext context) {
|
||||
List<Widget> widgets = [];
|
||||
|
||||
tappableText.forEach((String text, GestureTapCallback handleOnTap) {
|
||||
widgets.add(GestureDetector(
|
||||
onTap: handleOnTap,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 15.0),
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(color: CupertinoColors.lightBackgroundGray),
|
||||
),
|
||||
),
|
||||
child: Text(text, textAlign: TextAlign.center),
|
||||
),
|
||||
));
|
||||
});
|
||||
|
||||
return widgets;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue