优化使用体验

This commit is contained in:
jyuesong
2022-01-19 15:14:29 +08:00
parent 16f4f27f17
commit 3959155c1b
8 changed files with 190 additions and 133 deletions

View File

@@ -35,45 +35,49 @@ class _HomePageState extends ConsumerState<HomePage> {
List<Widget> actions = [];
if (_index == 0) {
actions.add(InkWell(
onTap: () {
Navigator.of(context).pushNamed(
Routes.routeAddTask,
);
},
child: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 15,
),
child: Center(
child: Icon(
CupertinoIcons.add,
size: 20,
color: Colors.white,
actions.add(
InkWell(
onTap: () {
Navigator.of(context).pushNamed(
Routes.routeAddTask,
);
},
child: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 15,
),
child: Center(
child: Icon(
CupertinoIcons.add,
size: 24,
color: Colors.white,
),
),
),
),
));
);
} else if (_index == 1) {
actions.add(InkWell(
onTap: () {
Navigator.of(context).pushNamed(
Routes.routeAddEnv,
);
},
child: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 15,
),
child: Center(
child: Icon(
CupertinoIcons.add,
size: 20,
color: Colors.white,
actions.add(
InkWell(
onTap: () {
Navigator.of(context).pushNamed(
Routes.routeAddEnv,
);
},
child: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 15,
),
child: Center(
child: Icon(
CupertinoIcons.add,
size: 24,
color: Colors.white,
),
),
),
),
));
);
} else if (_index == 2) {
actions.add(InkWell(
onTap: () {