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.

103 lines
3.4 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. body: SafeArea(
  26. child: Home(),
  27. )
  28. ),
  29. theme: ThemeData(
  30. brightness: Brightness.light,
  31. primaryColor: Colors.red,
  32. appBarTheme: const AppBarTheme(
  33. backgroundColor: Colors.cyan,
  34. elevation: 0,
  35. ),
  36. inputDecorationTheme: const InputDecorationTheme(
  37. labelStyle: TextStyle(
  38. color: Colors.white,
  39. fontSize: 30,
  40. ),
  41. filled: false,
  42. ),
  43. ),
  44. darkTheme: ThemeData(
  45. brightness: Brightness.dark,
  46. primaryColor: Colors.orange.shade900,
  47. backgroundColor: Colors.grey.shade800,
  48. scaffoldBackgroundColor: Colors.grey[850],
  49. colorScheme: ColorScheme(
  50. brightness: Brightness.dark,
  51. primary: Colors.orange.shade900,
  52. onPrimary: Colors.white,
  53. secondary: Colors.orange.shade900,
  54. onSecondary: Colors.white,
  55. tertiary: Colors.grey.shade500,
  56. onTertiary: Colors.black,
  57. error: Colors.red,
  58. onError: Colors.white,
  59. background: Colors.grey.shade900,
  60. onBackground: Colors.white,
  61. surface: Colors.grey.shade700,
  62. onSurface: Colors.white,
  63. ),
  64. hintColor: Colors.grey.shade500,
  65. inputDecorationTheme: InputDecorationTheme(
  66. filled: true,
  67. fillColor: Colors.grey.shade800,
  68. hintStyle: TextStyle(
  69. color: Colors.grey.shade500,
  70. ),
  71. iconColor: Colors.grey.shade500,
  72. contentPadding: const EdgeInsets.all(8),
  73. enabledBorder: OutlineInputBorder(
  74. borderRadius: BorderRadius.circular(15),
  75. borderSide: const BorderSide(
  76. color: Colors.transparent,
  77. )
  78. ),
  79. focusedBorder: OutlineInputBorder(
  80. borderRadius: BorderRadius.circular(15),
  81. borderSide: const BorderSide(
  82. color: Colors.transparent,
  83. )
  84. ),
  85. ),
  86. appBarTheme: AppBarTheme(
  87. color: Colors.grey.shade800,
  88. iconTheme: IconThemeData(
  89. color: Colors.grey.shade400
  90. ),
  91. toolbarTextStyle: TextStyle(
  92. color: Colors.grey.shade400
  93. ),
  94. ),
  95. ),
  96. );
  97. }
  98. }