2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Add API class

- Secure token based on username/password
This commit is contained in:
Oliver Walters
2019-06-25 00:39:20 +10:00
parent f747692277
commit 3258903745
5 changed files with 133 additions and 2 deletions

View File

@ -1,5 +1,8 @@
import 'package:flutter/material.dart';
import 'settings.dart';
import 'api.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@ -57,6 +60,10 @@ class _MyHomePageState extends State<MyHomePage> {
});
}
void _login() {
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeSettingsWidget()));
}
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
@ -89,8 +96,9 @@ class _MyHomePageState extends State<MyHomePage> {
),
new Divider(),
new ListTile(
title: new Text("Log In"),
leading: new Icon(Icons.security),
title: new Text("Settings"),
leading: new Icon(Icons.settings),
onTap: _login,
),
],
)