Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

flutter theme

inspired by panache, a flutter material theme editor for you to configure the overall visual theme of your material app.

usage

flutter theme is developed and built with flutter, and is available for both web and desktop.

disclaimer: i’ve only tested the app on web and macos as i don’t have a windows or linux machine. the app may not work on those platforms.

for web, you can access it through here.

for mac, windows and linux, you can be download it from here.

using the generated theme

flutter theme allows you to export your generated theme as a json file using json_theme. to use this theme in your app, follow the steps below:

  1. add json_theme as a dependency in your pubspec.yaml file.
    dependencies:
      json_theme: ^2.1.0+2
    
  2. copy the generated json file to your app project and place it under the assets/ folder.
  3. update your pubspec.yaml file to include your asset.
    flutter:
      assets:
        - assets/flutter_theme.json
    
  4. update your main function to load your theme.
    void main() async {
      widgetsflutterbinding.ensureinitialized();
      final themestr = await rootbundle.loadstring('assets/flutter_theme.json');
      final themejson = jsondecode(themestr);
      final theme = themedecoder.decodethemedata(themejson)!;
    }
    
  5. you can then pass in theme to your materialapp widget to use it.
    materialapp(
      theme: theme,
      title: 'flutter theme',
      home: homepage(),
    );
    

for a complete example app using the generated json theme file, see the app under the example/ folder.


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.