Issue I created a model class for Provider. Which will fit the function of getting data from SharedPreferences Future getDataPerson() async { final SharedPreferences prefs = await SharedPreferences.getInstance(); id = prefs.getInt(‘id’) ?? 000; name = prefs.getString(‘name’) ?? "Фамилия Имя Отчество";
Continue readingTag: provider
Does using 2 same Provider Consumer in one widget tree rebuild all different consumer value?
Issue Im trying to build my app as good as possible using provider. If i put same consumer provider in one widget like this for example Column( children: [ Consumer<Provider1>( builder: (context, value, child) { return Text(value.text1); }, ), Consumer<Provider1>(
Continue readingFlutter ProviderNotFoundException Issue
Issue I want use Firebase Auth in Flutter project. And I am use provider. Everything is okey but I am facing one issue with provider. My IconButtonWidget: class SocialIconButton extends StatelessWidget { final String socialIcon; const SocialIconButton({Key? key, required this.socialIcon})
Continue readingHow to use provider package to reload a widget tree of a stateless class
Issue here is the logic, to get the data from the internet , when loading is not complete show a progressbar widget and when the loading is complete show the complete widget tree with text fields, pictures etc firstly in
Continue readingFlutter, Cloud Firestore and Provider : Fetching data
Issue I have products stored on cloud firestore, I am able to fetch and display the products using the provider package. However, when I go to different page and return to the products screen, the products are duplicated every time.
Continue readingFlutter provider loosing value when navigating to another screen
Issue I’m new to Flutter and provider package so any assistance would be great, so the issue I have my main.dart file which is as follows: void main() => runApp( MaterialApp( debugShowCheckedModeBanner: false, theme: ThemeData.light(), home: ChangeNotifierProvider( create: (_) =>
Continue readingsetState() or markNeedsBuild() called during build. when resetting provider
Issue This code is working fine and resetting provider element but why this error in console. calling this function on init() in stateful class; Future getPlotsGraphDataAccordingToCategoryAndDate(context,CategoryId,CategoryName,date) async { var getRepresentationProvider = Provider.of<RepresentationProvider>(context, listen: false); getRepresentationProvider.resetPerticularCategoryDataAccordingDate(); var response = await http.get(url,
Continue readingFlutter – A RenderFlex overflowed by 190 pixels on the bottom in showModalBottomSheet
Issue My showModalBottomSheet showing bottom overflow error : My Code of bottomSheet: loginSheet(BuildContext context) { return showModalBottomSheet( isScrollControlled: true, context: context, builder: (context) { return Padding( padding: EdgeInsets.only( bottom: MediaQuery.of(context).viewInsets.bottom, ), child: Container( height: MediaQuery.of(context).size.height * 0.30, width: MediaQuery.of(context).size.width, child:
Continue readingAdding and Removing items from a list using provider flutter
Issue I’m making favorite list which contains the user favorite journeys using provider then I will display these journeys in the favorite journeys screen. Favorite.dart: import ‘package:flutter/material.dart’; class Favorite extends ChangeNotifier { final Text date; final Text time; final Text
Continue readingFlutter Remove Dispose Delete Widget by User
Issue I have a GridView.builder. Inside I have TextButtons which the user can add with their chosen name and color. onLongPress: activates an AllertDialog which asks the user to delete the Button. However, it does not delete with a Callback
Continue reading