46 lines
1.2 KiB
Dart
46 lines
1.2 KiB
Dart
import 'package:manager_app/app_context.dart';
|
|
import 'package:managerapi/api.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
class MainScreen extends StatefulWidget {
|
|
MainScreen({Key key, this.title}) : super(key: key);
|
|
|
|
final String title;
|
|
|
|
@override
|
|
_MainScreenState createState() => _MainScreenState();
|
|
}
|
|
|
|
class _MainScreenState extends State<MainScreen> {
|
|
int _counter = 0;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final appContext = Provider.of<AppContext>(context);
|
|
|
|
print(appContext.getContext().email);
|
|
|
|
return Scaffold(
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: <Widget>[
|
|
Text(
|
|
'You have pushed the button this many times:',
|
|
),
|
|
Text(
|
|
'$_counter',
|
|
style: Theme.of(context).textTheme.headline4,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
floatingActionButton: FloatingActionButton(
|
|
onPressed: () => print("YOULOU"),
|
|
tooltip: 'Increment',
|
|
child: Icon(Icons.add),
|
|
), // This trailing comma makes auto-formatting nicer for build methods.
|
|
);
|
|
}
|
|
} |