1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 16:25:17 +00:00

Initial commit

This commit is contained in:
2019-04-21 10:34:27 +02:00
commit c1a667b84b
59 changed files with 1508 additions and 0 deletions

View File

@ -0,0 +1,14 @@
/// Accounts credentials helper
///
/// Stores current account tokens
///
/// @author Pierre HUBERT
class AccountCredentialsHelper {
/// Checkout whether current user is signed in or not
Future<bool> signedIn() async {
return false; // TODO : implement
}
}

33
lib/main.dart Normal file
View File

@ -0,0 +1,33 @@
import 'package:comunic/helpers/account_credentials_helper.dart';
import 'package:comunic/ui/login_route.dart';
import 'package:flutter/material.dart';
/// Main file of the application
///
/// @author Pierre HUBERT
void main() {
runApp(ComunicApplication());
}
class ComunicApplication extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
// We need to know whether the user is signed in or not to continue
home: FutureBuilder(
future: AccountCredentialsHelper().signedIn(),
builder: (b, AsyncSnapshot<bool> c){
if(!c.hasData)
return CircularProgressIndicator();
else
if(c.data)
throw "Not supported yet !";
else
return LoginRoute();
},
),
);
}
}

17
lib/ui/login_route.dart Normal file
View File

@ -0,0 +1,17 @@
import 'package:flutter/material.dart';
/// Login route
///
/// @author Pierre HUBERT
class LoginRoute extends StatefulWidget {
@override
State<StatefulWidget> createState() => _LoginRouteState();
}
class _LoginRouteState extends State<LoginRoute> {
@override
Widget build(BuildContext context) {
return Text("Hello world");
}
}