Getting type 'Null' is not a subtype of type 'BuildContext' while trying to push data from one flutter screen to another

Issue Here’s widget.dart Widget wallpapersList({required List<WallpaperModel> wallpapers, context}) { return Container( padding: EdgeInsets.symmetric(horizontal: 16), child: GridView.count( shrinkWrap: true, physics: ClampingScrollPhysics(), crossAxisCount: 2, childAspectRatio: 0.6, mainAxisSpacing: 6.0, crossAxisSpacing: 6.0, children: wallpapers.map((wallpaper) { return GridTile( child: GestureDetector( onTap: () { print(wallpaper.src!.portrait); //

Continue reading

The following _CastError was thrown building FutureBuilder<DatabaseNote>

Issue I am encountering a _CastError in Flutter and I’m not sure what can cause it : ═══════ Exception caught by widgets library ═══════════════════════════════════ The following _CastError was thrown building FutureBuilder<DatabaseNote>(dirty, state: _FutureBuilderState<DatabaseNote>#aa5d0): type ‘Null’ is not a subtype of

Continue reading

How to customize tabBar?

Issue I want to make tapBar looking like this: But only got this: This is my code(DefaultTabContainer is wrapped with container with height: 600 and width: 300): DefaultTabController( length: 3, child: Scaffold( appBar: PreferredSize( preferredSize: Size.fromHeight(35.h), child: Container( margin: EdgeInsets.symmetric(horizontal:

Continue reading