47 lines
1.3 KiB
Dart
47 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:local_spend/common/platform/platform_scaffold.dart';
|
|
import 'package:local_spend/common/widgets/basic_drawer.dart';
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
class HomePage extends StatefulWidget {
|
|
@override
|
|
_HomePageState createState() => _HomePageState();
|
|
}
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_saveCurrentRoute("/HomePage");
|
|
}
|
|
|
|
_saveCurrentRoute(String lastRoute) async {
|
|
SharedPreferences preferences = await SharedPreferences.getInstance();
|
|
await preferences.setString('LastScreenRoute', lastRoute);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return PlatformScaffold(
|
|
appBar: AppBar(
|
|
title: Text(
|
|
"Home Page",
|
|
style: TextStyle(color: Colors.black),
|
|
),
|
|
iconTheme: IconThemeData(color: Colors.black),
|
|
elevation: Theme.of(context).platform == TargetPlatform.iOS ? 0.0 : 6.0,
|
|
),
|
|
drawer: BasicDrawer(),
|
|
body: Container(
|
|
padding: EdgeInsets.all(32.0),
|
|
child: Center(
|
|
child: Column(
|
|
children: <Widget>[
|
|
Text('This is the Home page'),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|