Encrypted messaging app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.9 KiB

  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_dotenv/flutter_dotenv.dart';
  3. import '/views/main/home.dart';
  4. import '/views/authentication/unauthenticated_landing.dart';
  5. import '/views/authentication/login.dart';
  6. import '/views/authentication/signup.dart';
  7. void main() async {
  8. await dotenv.load(fileName: ".env");
  9. runApp(const MyApp());
  10. }
  11. class MyApp extends StatelessWidget {
  12. const MyApp({Key? key}) : super(key: key);
  13. static const String _title = 'Envelope';
  14. @override
  15. Widget build(BuildContext context) {
  16. return MaterialApp(
  17. title: _title,
  18. routes: {
  19. '/home': (context) => const Home(),
  20. '/landing': (context) => const UnauthenticatedLandingWidget(),
  21. '/login': (context) => const Login(),
  22. '/signup': (context) => const Signup(),
  23. },
  24. home: const Scaffold(
  25. backgroundColor: Colors.cyan,
  26. body: SafeArea(
  27. child: Home(),
  28. )
  29. ),
  30. theme: ThemeData(
  31. appBarTheme: const AppBarTheme(
  32. backgroundColor: Colors.cyan,
  33. elevation: 0,
  34. ),
  35. inputDecorationTheme: const InputDecorationTheme(
  36. border: OutlineInputBorder(),
  37. focusedBorder: OutlineInputBorder(),
  38. labelStyle: TextStyle(
  39. color: Colors.white,
  40. fontSize: 30,
  41. ),
  42. filled: true,
  43. fillColor: Colors.white,
  44. ),
  45. ),
  46. );
  47. }
  48. }