languages

A collection of programs made with different programming languages.
git clone git://evanalba.com/languages
Log | Files | Refs

themes.dart (1806B)


      1 // In a separate file (e.g., themes.dart)
      2 
      3 import 'package:flutter/material.dart';
      4 
      5 const Color _primaryColor = Colors.teal; // Adjust based on your app's primary color
      6 
      7 ThemeData lightThemeData = ThemeData(
      8   brightness: Brightness.light,
      9   primaryColor: _primaryColor, // Adjust based on your app's accent color
     10   fontFamily: 'Roboto',
     11   textTheme: const TextTheme(
     12     bodyLarge: TextStyle(color: Colors.black),
     13     bodyMedium: TextStyle(color: Colors.black54),
     14     titleMedium: TextStyle(color: Colors.black54),
     15     titleLarge: TextStyle(color: Colors.black),
     16   ),
     17   appBarTheme: const AppBarTheme(
     18     backgroundColor: Colors.white,
     19     iconTheme: IconThemeData(color: Colors.black),
     20   ),
     21   bottomNavigationBarTheme: const BottomNavigationBarThemeData(
     22     backgroundColor: Colors.white,
     23     selectedItemColor: _primaryColor,
     24     unselectedItemColor: Colors.black54,
     25   ), colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.teal).copyWith(secondary: Colors.pinkAccent),
     26 );
     27 
     28 ThemeData darkThemeData = ThemeData(
     29   brightness: Brightness.dark,
     30   primaryColor: _primaryColor, // Adjust based on your app's accent color
     31   fontFamily: 'Roboto',
     32   textTheme: const TextTheme(
     33     bodyLarge: TextStyle(color: Colors.white),
     34     bodyMedium: TextStyle(color: Colors.white70),
     35     titleMedium: TextStyle(color: Colors.white70),
     36     titleLarge: TextStyle(color: Colors.white),
     37   ),
     38   appBarTheme: const AppBarTheme(
     39     backgroundColor: Colors.black,
     40     iconTheme: IconThemeData(color: Colors.white),
     41   ),
     42   bottomNavigationBarTheme: const BottomNavigationBarThemeData(
     43     backgroundColor: Colors.black,
     44     selectedItemColor: _primaryColor,
     45     unselectedItemColor: Colors.white54,
     46   ), colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.teal).copyWith(secondary: Colors.tealAccent.shade700),
     47 );