Created
July 9, 2023 02:41
-
-
Save dayerdl/e649c75c04701d4ecb4be7185a12fb5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import '../MaterialColorGenerator.dart'; | |
import '../exercises/ExercisesListScreen.dart'; | |
import '../main.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData( | |
primarySwatch: Colors.green, // Example primary color | |
hintColor: Colors.red, // Example accent color | |
brightness: Brightness.light, // Exampl | |
useMaterial3: true, | |
colorSchemeSeed: Colors.greenAccent, | |
), | |
home: ExercisesListScreen(mode: ExercisesListScreenMode.LIST), | |
); | |
} | |
} | |
class MyHomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('ListView Theme Example'), | |
), | |
body: Theme( | |
data: Theme.of(context).copyWith( | |
// Customize the theme for ListView | |
hintColor: Colors.blue, // Example accent color for ListView | |
), | |
child: ListView.builder( | |
itemCount: 5, | |
itemBuilder: (BuildContext context, int index) { | |
return ListTile( | |
title: Text('Item $index'), | |
subtitle: Text('Subtitle $index'), | |
trailing: Icon(Icons.arrow_forward), | |
); | |
}, | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment