Skip to content

Andresit0/Select_App_Color_Flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

App that Allow Change Colors Dinamically

Image1 of App Image2 of App Image3 of App

In the main is used a StreamBuilder

import 'dart:async';

...
StreamController<MaterialColor> isLightTheme = StreamController();
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return StreamBuilder<MaterialColor>(
        initialData: Colors.blue,
        stream: isLightTheme.stream,
        builder: (context, snapshot) {
          return MaterialApp(
            title: 'FACTEC',
            theme: ThemeData(
              primarySwatch: snapshot.data,
              visualDensity: VisualDensity.adaptivePlatformDensity,
            ),
            home: MyHomePage(title: 'Flutter Change Color'),
          );
        });
  }
}
...

List of App Colors

The widget is called using

child: ListBtnsAppColors()

The "ListBtnsAppColors()" use material colors ubicated in "listBtnsAppColors.dart" and a new material black color localized inside "colors.dart".

About

Template to allow chose a color on Flutter App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published