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.

102 lines
3.3 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. colorScheme: ColorScheme(
  49. brightness: Brightness.dark,
  50. primary: Colors.orange.shade900,
  51. onPrimary: Colors.white,
  52. secondary: Colors.orange.shade900,
  53. onSecondary: Colors.white,
  54. tertiary: Colors.grey.shade500,
  55. onTertiary: Colors.black,
  56. error: Colors.red,
  57. onError: Colors.white,
  58. background: Colors.grey.shade900,
  59. onBackground: Colors.white,
  60. surface: Colors.grey.shade700,
  61. onSurface: Colors.white,
  62. ),
  63. hintColor: Colors.grey.shade500,
  64. inputDecorationTheme: InputDecorationTheme(
  65. filled: true,
  66. fillColor: Colors.grey.shade800,
  67. hintStyle: TextStyle(
  68. color: Colors.grey.shade500,
  69. ),
  70. iconColor: Colors.grey.shade500,
  71. contentPadding: const EdgeInsets.all(8),
  72. enabledBorder: OutlineInputBorder(
  73. borderRadius: BorderRadius.circular(15),
  74. borderSide: const BorderSide(
  75. color: Colors.transparent,
  76. )
  77. ),
  78. focusedBorder: OutlineInputBorder(
  79. borderRadius: BorderRadius.circular(15),
  80. borderSide: const BorderSide(
  81. color: Colors.transparent,
  82. )
  83. ),
  84. ),
  85. appBarTheme: AppBarTheme(
  86. color: Colors.grey.shade800,
  87. iconTheme: IconThemeData(
  88. color: Colors.grey.shade400
  89. ),
  90. toolbarTextStyle: TextStyle(
  91. color: Colors.grey.shade400
  92. ),
  93. ),
  94. ),
  95. );
  96. }
  97. }