61 lines
1.5 KiB
Dart
61 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:remixicon/remixicon.dart';
|
|
|
|
import '../../router/config/route_paths.dart';
|
|
import '../my/my_page.dart';
|
|
import 'widget/plan_form_card.dart';
|
|
import 'widget/quote_card.dart';
|
|
|
|
class HomePage extends StatefulWidget {
|
|
const HomePage({super.key});
|
|
|
|
@override
|
|
State<HomePage> createState() => _HomePageState();
|
|
}
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
key: _scaffoldKey,
|
|
backgroundColor: Colors.white,
|
|
appBar: AppBar(
|
|
leading: IconButton(
|
|
onPressed: () {
|
|
_scaffoldKey.currentState?.openDrawer();
|
|
},
|
|
icon: Icon(RemixIcons.user_fill),
|
|
),
|
|
actions: [
|
|
IconButton(
|
|
color: Colors.black,
|
|
onPressed: () {
|
|
context.push(RoutePaths.planHistory);
|
|
},
|
|
icon: Icon(RemixIcons.time_fill),
|
|
),
|
|
],
|
|
),
|
|
body: ListView(
|
|
padding: EdgeInsets.symmetric(horizontal: 15),
|
|
children: [
|
|
QuoteCard(),
|
|
PlanFormCard(),
|
|
],
|
|
),
|
|
drawer: Drawer(
|
|
backgroundColor: Colors.white,
|
|
width: double.infinity,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(),
|
|
child: MyPage(
|
|
scaffoldKey: _scaffoldKey,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|