Error: ‘ModalBottomSheetRoute’ is imported from both

The reason behind the error is says both material/bottom_sheet.dart and bottom_sheet_route exports the ModalBottomSheetRoute. ‘ModalBottomSheetRoute’ is imported from both ‘package:flutter/src/material/bottom_sheet.dart’ and ‘package:modal_bottom_sheet/src/bottom_sheet_route.dart’. In order to fix this issue we have to hide one of the ModalBottomSheetRoute. since we need this to be imported from bottom_sheet_route we need to hide it from material This is the … Read more

Error: Field ‘wLanguage’ cannot be nullable or have type ‘Null’, it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`

I finally fix my problem by overriding these packages in my project’s pubspec.yaml dependency_overrides: package_info_plus: ^4.0.1 wakelock_windows: any win32: any or dependency_overrides: package_info_plus: any Overriding the package_info_plus to ^4.0.1 gave me the following error message because of my project dependencies. Because no versions of wakelock_windows match >0.2.1 <0.3.0 and wakelock_windows <0.2.1 depends on win32 ^2.0.0, … Read more

flutter_launcher_icons not working Unhandled exception: FormatException: Invalid number (at character 1)

I just had the same problem and solved doing this in android/app/build.gradle. Changed: minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion To: minSdkVersion 26 targetSdkVersion 30 Source [Edit] After that, I could not run on emulator, so I changed back the gradle file (without running flutter_launcher_icon again). Now I have the app running and the icons are right.

Error: RenderBox was not laid out, Failed assertion: line 1940 pos 12: ‘hasSize’

This happens when ListView has no constrained height which makes it gets an infinite height, you can solve this using two solutions add shrinkWrap: true as a parameter which will tell the ListView to use a little space as possible, Wrap your ListView with a constrained height widget, such as a SizedBox or a Container, … Read more

How can I put a widget above another widget in Flutter?

@override Widget build(BuildContext context) { // TODO: implement build return new Container( width: 150.0, height: 150.0, child: new Stack(children: <Widget>[ new Container( alignment: Alignment.center, color: Colors.redAccent, child: Text(‘Hello’), ), new Align(alignment: Alignment.bottomRight, child: FloatingActionButton( child: new Icon(Icons.add), onPressed: (){}), ) ], ), ); }

Error: PlatformException(no_fragment_activity, local_auth plugin requires activity to be a FragmentActivity., null)

This is what I did to solve this issue. Change your MainActivity.kt as below: package com.[your.package] import androidx.annotation.NonNull import io.flutter.embedding.android.FlutterFragmentActivity import io.flutter.embedding.engine.FlutterEngine import io.flutter.plugins.GeneratedPluginRegistrant class MainActivity: FlutterFragmentActivity() { override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { GeneratedPluginRegistrant.registerWith(flutterEngine) } } However, after changing this MainActivity.kt, I also faced some other issue with the Theme.AppCompat. Check this out https://gist.github.com/akifarhan/f70a2c777651f2ea61a15eb92a5939c1 … Read more

How do I add an Example Project to a Flutter Package?

To create a Flutter package with an Example in Android Studio Create a new Flutter Project Select Flutter Package After the new project opens in Android Studio, select the “Terminal” tab and then run: flutter create example Select “Edit Configuration”-> add configuration -> Select the main.dart file that is located in the example/lib folder Open … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)