Flutter Web: Cannot scroll with mouse down (drag) (Flutter 2.5+)

My final solution was a combination of the suggestions, wanting drag scrolling everywhere, so used this: class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( scrollBehavior: MaterialScrollBehavior().copyWith( dragDevices: {PointerDeviceKind.mouse, PointerDeviceKind.touch, PointerDeviceKind.stylus, PointerDeviceKind.unknown}, ), … Simple enough…

How to find memory leaks in Flutter?

I am implemented Memory leak testing in android studio ide. Step – 1 : Connect your device with android studio and run your application on your device. Step – 2 : Go to View -> Tool Windows -> Flutter Performance Step – 3 : Bottom of the window Open Dev Tools option will be there, … Read more

Flutter NotificationListener with ScrollNotification vs ScrollController

If you’re using NestedScrollView with nested scrollers, using a scrollController on the inner scrollers will break the link with NestedScrollView meaning NestedScrollView will no longer control the complete scrolling experience. To get information about the scroll positions of the inner scrollers in this case you would use a NotificationListener with ScrollNotification. NotificationListener<ScrollNotification>( child: ListView.builder( itemCount: … Read more

How to use generics and list of generics with json serialization in Dart?

json_serializable json_serializable has a several strategies1 to handle generic types as single objects T or List<T> (as of v. 5.0.2+) : Helper Class: JsonConverter Helper Methods: @JsonKey(fromJson:, toJson:) Generic Argument Factories @JsonSerializable(genericArgumentFactories: true) 1 Of which I’m aware. There’s likely other ways to do this. Helper Class: JsonConverter Basic idea: write a custom JsonConverter class … Read more

The class ‘PreferredSizeWidget’ can’t be used as a mixin because it’s neither a mixin class nor a mixin

If you get the same error, just change the “with” with the “implements” like this: class MyAppBar extends StatelessWidget implements PreferredSizeWidget { … } Description: In Dart 3, the rules around mixins have been made stricter compared to previous versions. As mentioned in the release notes, any class could be used as a mixin before … Read more

Remove Flutter TabBar bottom border

Things get nasty if you use Material3 in your app: ThemeData( useMaterial3: true, … ) then all mentioned solutions do not work. If we read a documentation for TabBar: /// The color of the divider. /// /// If null and [ThemeData.useMaterial3] is true, [TabBarTheme.dividerColor] /// color is used. If that is null and [ThemeData.useMaterial3] is … Read more

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