Commit 10652cad authored by ayodyabanuka's avatar ayodyabanuka

updated

parent 7d209d0b
import 'dart:ffi';
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_database/firebase_database.dart'; import 'package:firebase_database/firebase_database.dart';
import 'package:firebase_database/ui/firebase_animated_list.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart'; import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart';
import 'package:ifarm/Screens/AB/bucket.dart';
import 'package:ifarm/Screens/AB/data.dart'; import 'package:ifarm/Screens/AB/data.dart';
import 'package:ifarm/functions/firebaseFunctions.dart'; import 'package:ifarm/functions/firebaseFunctions.dart';
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:ifarm/Screens/AB/Home.dart'; import 'package:ifarm/Screens/AB/Home.dart';
import 'package:ifarm/Screens/AB/Profile.dart'; import 'package:ifarm/Screens/AB/Profile.dart';
...@@ -20,7 +21,7 @@ class _NavbarState extends State<Navbar> { ...@@ -20,7 +21,7 @@ class _NavbarState extends State<Navbar> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Color(0xff024F8E), backgroundColor: const Color(0xff024F8E),
appBar: AppBar( appBar: AppBar(
title: const SizedBox( title: const SizedBox(
width: 100, width: 100,
...@@ -43,7 +44,7 @@ class _NavbarState extends State<Navbar> { ...@@ -43,7 +44,7 @@ class _NavbarState extends State<Navbar> {
], ],
), ),
bottomNavigationBar: BottomNavigationBar( bottomNavigationBar: BottomNavigationBar(
backgroundColor: Color.fromARGB(150, 6, 91, 161), backgroundColor: const Color.fromARGB(150, 6, 91, 161),
type: BottomNavigationBarType.fixed, type: BottomNavigationBarType.fixed,
elevation: 1, elevation: 1,
currentIndex: _selectedIndex, currentIndex: _selectedIndex,
...@@ -52,10 +53,14 @@ class _NavbarState extends State<Navbar> { ...@@ -52,10 +53,14 @@ class _NavbarState extends State<Navbar> {
showSelectedLabels: false, showSelectedLabels: false,
showUnselectedLabels: false, showUnselectedLabels: false,
items: const [ items: const [
BottomNavigationBarItem(label: 'Home', icon: Icon(Icons.home)), BottomNavigationBarItem(
BottomNavigationBarItem(label: 'Buy', icon: Icon(Icons.shopping_bag)), label: 'Home', icon: FaIcon(FontAwesomeIcons.house)),
BottomNavigationBarItem(label: 'Profile', icon: Icon(Icons.person)), BottomNavigationBarItem(
BottomNavigationBarItem(label: 'Settings', icon: Icon(Icons.settings)) label: 'Statistic', icon: FaIcon(FontAwesomeIcons.chartLine)),
BottomNavigationBarItem(
label: 'Profile', icon: FaIcon(FontAwesomeIcons.user)),
BottomNavigationBarItem(
label: 'Settings', icon: FaIcon(FontAwesomeIcons.gear))
], ],
onTap: _onItemTapped, onTap: _onItemTapped,
), ),
......
This diff is collapsed.
...@@ -14,4 +14,11 @@ class FirestoreServices { ...@@ -14,4 +14,11 @@ class FirestoreServices {
.doc(name) .doc(name)
.set({'Buckets': foodbucketID}); .set({'Buckets': foodbucketID});
} }
static removefoodbuckets(foodbucketID, name) async {
await FirebaseFirestore.instance
.collection('buckets')
.doc(name)
.set({'Buckets': foodbucketID});
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment