skip to Main Content

Saving theme in flutter with Hive

so i tried changing theme with provider and heres my main.dart import 'package:flutter/material.dart'; import 'package:hive_flutter/hive_flutter.dart'; import 'package:provider/provider.dart'; import 'package:themetestnew/homepage.dart'; import 'package:themetestnew/theme/theme_provider.dart'; void main() async { await Hive.initFlutter(); await Hive.openBox('myBox'); runApp( ChangeNotifierProvider( create: (context) => ThemeProviderNew(), child: MyApp(), ), ); }…

VIEW QUESTION

Flutter – How to make dynamically with condition color

How to make my backgroundColor become dynamic color? I have code Expanded( child: ListView.builder( itemCount: controller.proposal.length, padding: EdgeInsets.zero, itemBuilder: (context, index) { var item = controller.proposal[index]; if (item["status_proposal"] == "REJECTED") { var color = Colors.red; } else if (item["status_proposal"] ==…

VIEW QUESTION
Back To Top
Search