76 lines
2.2 KiB
Dart
76 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:habitrack_app/pages/tasks_graph_widget.dart';
|
|
|
|
class SubpageTaskButton extends StatelessWidget {
|
|
const SubpageTaskButton({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
width: 300,
|
|
margin: const EdgeInsets.only(top: 7.5, bottom: 7.5),
|
|
child: ElevatedButton(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(10),
|
|
),
|
|
minimumSize: const Size(10, 70),
|
|
),
|
|
onPressed: () => {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute<dynamic>(
|
|
builder: (context) => const DashboardTaskSubpage(),
|
|
),
|
|
),
|
|
},
|
|
child: Row(
|
|
children: [
|
|
Icon(
|
|
Icons.task,
|
|
color: Theme.of(context).colorScheme.onPrimary,
|
|
),
|
|
Text(
|
|
' Task Widgets',
|
|
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
|
color: Theme.of(context).colorScheme.onPrimary,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class DashboardTaskSubpage extends StatefulWidget {
|
|
const DashboardTaskSubpage({super.key});
|
|
|
|
@override
|
|
State<StatefulWidget> createState() => _DashboardTaskSubpageState();
|
|
}
|
|
|
|
class _DashboardTaskSubpageState extends State<DashboardTaskSubpage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Theme.of(context).colorScheme.primaryContainer,
|
|
appBar: AppBar(
|
|
iconTheme: IconThemeData(
|
|
color: Theme.of(context).colorScheme.onPrimary,
|
|
),
|
|
backgroundColor: Theme.of(context).colorScheme.secondary,
|
|
foregroundColor: Theme.of(context).colorScheme.primary,
|
|
title: Text(
|
|
'Statistics: Tasks Widgets',
|
|
textScaler: const TextScaler.linear(1.2),
|
|
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
|
color: Theme.of(context).colorScheme.onPrimary,
|
|
),
|
|
),
|
|
),
|
|
body: TasksGraphWidget(),
|
|
);
|
|
}
|
|
}
|