skip to Main Content

I need to create a carousel slider using the data fetch from firebase. i have tried a lots of methods but didn't work – Flutter

This is the firebase database structure that I am using: import 'package:awesome_dropdown/awesome_dropdown.dart'; import 'package:carousel_slider/carousel_controller.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'package:hexated/Refactored/widgets/headings.dart'; import 'package:smooth_page_indicator/smooth_page_indicator.dart'; import '../Refactored/sections/bottomNavigation.dart'; import '../Refactored/sections/todaysMealContainer.dart'; import '../Refactored/widgets/mealDayList.dart'; class messDiary extends StatefulWidget { messDiary({Key? key}) : super(key: key)…

VIEW QUESTION

How to convert object to map in dart flutter

using Stream I get the data from firebase void getsds() async { DatabaseReference ref = FirebaseDatabase.instance.ref("NearbyAccidents/User1/acc_coordinates"); Stream<DatabaseEvent> stream = ref.onValue; stream.listen((DatabaseEvent event) { print('Event Type: ${event.type}'); // DatabaseEventType.value; print('Snapshot: ${event.snapshot.value}'); List<Object?> map1 = event.snapshot.value as dynamic; print(map1[0]); }); } for…

VIEW QUESTION

How i fix username password email is null in flutter

I use widget StatefulWidget and _inputFiled I've created a model class class Profile { String? email; String? username; String? password; Profile({ this.email, this.username, this.password, }); } And using like class _RegisterScreenState extends State<RegisterScreen> { final formKey = GlobalKey<FormState>(); Profile profile…

VIEW QUESTION

i am trying to use map function in flutter

VSCode show me this problem notification: Exception has occurred. NoSuchMethodError (NoSuchMethodError: The method 'map' was called on null. Receiver: null Tried calling: map(Closure: (String) => Answer)) this is the main library code: import 'package:flutter/material.dart'; import './question.dart'; import 'answer.dart'; void main()…

VIEW QUESTION
Back To Top
Search