Created
April 26, 2020 01:24
-
-
Save riscait/c5483c2d25735e741220696332003592 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'package:provider/provider.dart'; | |
import 'home_page.dart'; | |
import 'util/theme/theme_mode_notifier.dart'; | |
class App extends StatelessWidget { | |
const App(); | |
@override | |
Widget build(BuildContext context) { | |
final themeModeNotifier = Provider.of<ThemeModeNotifier>(context); | |
return MaterialApp( | |
title: 'Flutter Selectable Themes example', | |
theme: themeModeNotifier.themeData, | |
darkTheme: themeModeNotifier.darkThemeData, | |
home: const HomePage(), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment