About the function of the new button I created

I created a new Button Class. This button has a Timer, which is normally gray and changes color after 5 seconds. When tapped, it turns gray again and changes color after 5 seconds. I want to reset the counter (_counter=0) to change the color, but I don’t know how to do it. This is my code. class… Read More About the function of the new button I created

Missing push notification entitlement while publishing iOS app with Appollo

I tried to publish my app to the app store with [appollo](https://github.com/Appollo-CLI/Appollo) but it failed. I got an e-mail from Apple with the following error message : ITMS-90078: Missing Push Notification Entitlement – Your app appears to register with the Apple Push Notification service, but the app signature’s entitlements do not include the ‘aps-environment’ entitlement.… Read More Missing push notification entitlement while publishing iOS app with Appollo

When I add date picker then show 'Non-nullable instance field 'selectedDate' must be initialized. ' error

When I add date picker then show ‘Non-nullable instance field ‘selectedDate’ must be initialized. ‘ error DateTime selectedDate; void showDatePicker() { showCupertinoModalPopup( context: context, builder: (BuildContext builder) { return Container( height: MediaQuery.of(context).copyWith().size.height * 0.25, color: Colors.white, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.date, onDateTimeChanged: (value) { if (value != null && value != selectedDate) setState(() { selectedDate =… Read More When I add date picker then show 'Non-nullable instance field 'selectedDate' must be initialized. ' error

get data from json based on index number in flutter

I have a json file from where I am collecting only email addresses, and want to print index number base output like 3rd record’s email address to Text widget.. class _HomeScreenState extends State<HomeScreen> { List<String> list = []; Future<List<String>> getcomments() async { Uri url = Uri.parse(‘https://jsonplaceholder.typicode.com/posts/1/comments&#8217;); var response = await http.get(url); if (response.statusCode == 200)… Read More get data from json based on index number in flutter

Flutter: Is it safe if I remove the code of flutter_native_splash & flutter_launcher_icons after run this code?

I have tried to remove these codes. flutter_icons: android: true ios: true image_path: "1024.png" adaptive_icon_foreground: "512.png" flutter_native_splash: android: true ios: true image: "A.png" The app still works successfully. So, is it safe to remove these? >Solution : These are tools to generate app icon and splash screen, so yes it is safe after generate those… Read More Flutter: Is it safe if I remove the code of flutter_native_splash & flutter_launcher_icons after run this code?

I have to refresh page for getting data in flutter listview.builder

I am fetching records from firebase collection with a UDF and calling this UDF inside Widget build, it has to refresh to show data, looks like. widget build before getting data….how to prevent loading widget build until data is not fetched … class _DemoPage2State extends State<DemoPage2> { List<String> list = []; void getusers() async {… Read More I have to refresh page for getting data in flutter listview.builder

Flutter: Error thrown in some case using ScrollablePositionedList

I’m working on an indexed list, I found this lib: ScrollablePositionedList that does the job, when I call the function jumpTo/scrollTo within a button tap, it works but when I call it before the return in build, it throws error: E/flutter ( 3018): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: ‘package:scrollable_positioned_list/src/scrollable_positioned_list.dart’: Failed assertion: line 236 pos 12: ‘_scrollableListState !=… Read More Flutter: Error thrown in some case using ScrollablePositionedList