From 11d716cf0584d7239e898f52ce9d86866a2ffa34 Mon Sep 17 00:00:00 2001 From: Ashish Bailkeri Date: Sat, 25 Feb 2023 23:52:18 -0500 Subject: [PATCH 1/6] Updated Filtering --- lib/main_screen.dart | 9 +++++++++ lib/meetings.dart | 48 +++++++++++++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/lib/main_screen.dart b/lib/main_screen.dart index 8dac8fb..593c7a0 100644 --- a/lib/main_screen.dart +++ b/lib/main_screen.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'meetings.dart'; +import 'package:cloud_firestore/cloud_firestore.dart'; + class MainScreen extends StatefulWidget { const MainScreen({Key? key}) : super(key: key); @@ -11,6 +13,13 @@ class MainScreen extends StatefulWidget { class _MainScreenState extends State { @override Widget build(BuildContext context) { + print("OOOGABOOGA"); + getSellers(Filter( + ["Sbarro"], + PriceRange(8, 10), + TimeRange(Timestamp.fromDate(DateTime(2023, 2, 26, 12, 50)), + Timestamp.fromDate(DateTime(2023, 2, 26, 11, 50))))) + .then((value) => {print(value)}); return Scaffold( appBar: AppBar( title: const Text("Main Beens"), diff --git a/lib/meetings.dart b/lib/meetings.dart index 1b094cb..824a799 100644 --- a/lib/meetings.dart +++ b/lib/meetings.dart @@ -3,8 +3,8 @@ import 'dart:ffi'; import 'package:cloud_firestore/cloud_firestore.dart'; class TimeRange { - late DateTime startTime; - late DateTime endTime; + late Timestamp startTime; + late Timestamp endTime; TimeRange(this.startTime, this.endTime); } @@ -16,14 +16,24 @@ class PriceRange { PriceRange(this.low, this.high); } -class Seller { +class Seller implements Comparable { String name = ""; String uid = ""; - List location; + List location; TimeRange availableTime; int price; Seller(this.name, this.uid, this.location, this.availableTime, this.price); + + @override + String toString() { + return "Name: $name, Price: $price"; + } + + @override + int compareTo(Seller other) { + return this.name.compareTo(other.name); + } } class Filter { @@ -36,21 +46,35 @@ class Filter { Future> getSellers(Filter filter) async { CollectionReference users = FirebaseFirestore.instance.collection('sellers'); - List sellers = List.empty(); + List sellers = List.empty(growable: true); final Query query = users .where('location', arrayContainsAny: filter.locations) .where('price', isGreaterThanOrEqualTo: filter.price?.low, - isLessThanOrEqualTo: filter.price?.high) - .where('start-time', - isGreaterThanOrEqualTo: filter.meetingTime?.startTime) - .where('end-time', isLessThanOrEqualTo: filter.meetingTime?.endTime); + isLessThanOrEqualTo: filter.price?.high); final QuerySnapshot snapshot = await query.get(); - for (var doc in snapshot.docs) { - sellers.add(Seller(doc["name"], doc["uid"], doc["location"], - TimeRange(doc["start-time"], doc["end-time"]), doc["price"])); + final startTime = filter.meetingTime?.endTime; + final endTime = filter.meetingTime?.startTime; + + if (startTime != null && endTime != null) { + var docs = snapshot.docs + .where((element) => + startTime.compareTo(element["start-time"]) > 0 || + element["start-time"] == (startTime)) + .where((element) => + endTime.compareTo(element["end-time"]) < 0 || + element["end-time"] == (endTime)); + for (var doc in docs) { + sellers.add(Seller(doc["name"], doc["uid"], doc["location"], + TimeRange(doc["start-time"], doc["end-time"]), doc["price"])); + } + } else { + for (var doc in snapshot.docs) { + sellers.add(Seller(doc["name"], doc["uid"], doc["location"], + TimeRange(doc["start-time"], doc["end-time"]), doc["price"])); + } } return sellers; } From d49e21df0e842cb40d77f036ffc7e454685c2e78 Mon Sep 17 00:00:00 2001 From: NATHANIEL ENDICK Date: Sun, 26 Feb 2023 00:03:50 -0500 Subject: [PATCH 2/6] removed app bar --- lib/sell.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/sell.dart b/lib/sell.dart index f28b608..f68115a 100644 --- a/lib/sell.dart +++ b/lib/sell.dart @@ -12,10 +12,6 @@ class _SellScreenState extends State { Widget build(BuildContext context) { TimeOfDay _time = TimeOfDay.now(); return Scaffold( - appBar: AppBar( - title: const Text('Sell'), - automaticallyImplyLeading: false, - ), body: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ From f6a313ebf3f95751b148af4194dd0612e687be01 Mon Sep 17 00:00:00 2001 From: NATHANIEL ENDICK Date: Sun, 26 Feb 2023 00:04:06 -0500 Subject: [PATCH 3/6] buy ui --- lib/buy.dart | 84 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 9 deletions(-) diff --git a/lib/buy.dart b/lib/buy.dart index ddc2963..8ec7578 100644 --- a/lib/buy.dart +++ b/lib/buy.dart @@ -12,16 +12,23 @@ class _BuyScreenState extends State { Widget build(BuildContext context) { TimeOfDay _time = TimeOfDay.now(); return Scaffold( - appBar: AppBar( - title: const Text('Sell'), - automaticallyImplyLeading: false, - ), - body: OffersListView(), + body: const OffersListView(), ); } } -final List entries = ['A', 'B', 'C']; +final List entries = [ + 'Antoinette Beauchamp', + 'Iliana Campbell', + 'Angelique Straub', + 'Ryleigh Pond', + 'Andy Watters', + 'Raphael Gossett', + 'Kent Deutsch', + 'Bridger Mojica', + 'Pearl Morse', + 'Jana Munguia' +]; final List colorCodes = [600, 500, 100]; class OffersListView extends StatelessWidget { @@ -30,14 +37,73 @@ class OffersListView extends StatelessWidget { @override Widget build(BuildContext context) { return ListView.builder( - padding: const EdgeInsets.all(8), itemCount: 30, itemBuilder: (BuildContext context, int index) { return Container( height: 80, - color: Colors.amber[colorCodes[index % 3]], - child: Center(child: Text('Entry ${entries[index % 3]}')), + color: Colors.blue, + margin: const EdgeInsets.only(top: 4, bottom: 4), + child: Row( + children: [ + Expanded( + flex: 7, + child: Container( + color: Colors.red, + margin: EdgeInsets.only(top: 4, left: 4, bottom: 4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + entries[index % entries.length], + textAlign: TextAlign.start, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontSize: 24), + ), + Row( + children: [ + Icon(Icons.star, size: 16), + Icon(Icons.star, size: 16), + Icon(Icons.star, size: 16), + Icon(Icons.star_half, size: 16), + Icon(Icons.star_border, size: 16), + ], + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + const Text( + '\88:88PM - 88:88PM', + textAlign: TextAlign.start, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontSize: 16), + ), + ], + ), + ) + ], + ), + ), + ), + Expanded( + flex: 3, + child: Container( + color: Colors.orange, + child: const Text( + '\$88', + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 44), + ), + ), + ) + ], + ), ); }); } } +// return Container( +// height: 80, +// color: Colors.amber[colorCodes[index % colorCodes.length]], +// child: Center(child: Text(entries[index % entries.length])), +// ); \ No newline at end of file From c07ce524138c5b9f90d63bd99ac76eee670f557b Mon Sep 17 00:00:00 2001 From: Ashish Bailkeri Date: Sun, 26 Feb 2023 00:09:21 -0500 Subject: [PATCH 4/6] doubles are numbers --- lib/meetings.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/meetings.dart b/lib/meetings.dart index 824a799..2251916 100644 --- a/lib/meetings.dart +++ b/lib/meetings.dart @@ -10,8 +10,8 @@ class TimeRange { } class PriceRange { - int low = 0; - int high = 0; + double low = 0; + double high = 0; PriceRange(this.low, this.high); } @@ -32,7 +32,7 @@ class Seller implements Comparable { @override int compareTo(Seller other) { - return this.name.compareTo(other.name); + return name.compareTo(other.name); } } From 060216cd7c3f69c809b49213d676617213e4cf15 Mon Sep 17 00:00:00 2001 From: Hitesh Ale Date: Sun, 26 Feb 2023 00:19:20 -0500 Subject: [PATCH 5/6] bullshit --- android/app/build.gradle | 2 +- lib/credit_view.dart | 258 +++++++++++++++++++++++++++++++++ lib/profile_screen_custom.dart | 10 ++ pubspec.lock | 48 ++++++ pubspec.yaml | 1 + 5 files changed, 318 insertions(+), 1 deletion(-) create mode 100644 lib/credit_view.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index a67aa5f..0ad32a5 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -49,7 +49,7 @@ android { applicationId "com.example.ruswipeshare" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion 19 + minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/lib/credit_view.dart b/lib/credit_view.dart new file mode 100644 index 0000000..08073f2 --- /dev/null +++ b/lib/credit_view.dart @@ -0,0 +1,258 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_credit_card/credit_card_brand.dart'; +import 'package:flutter_credit_card/flutter_credit_card.dart'; +import 'package:flutter_stripe/flutter_stripe.dart'; + +void main() => runApp(CreditView()); + +class CreditView extends StatefulWidget { + @override + State createState() { + return CreditViewState(); + } +} + +class CreditViewState extends State { + String cardNumber = ''; + String expiryDate = ''; + String cardHolderName = ''; + String cvvCode = ''; + bool isCvvFocused = false; + bool useGlassMorphism = false; + bool useBackgroundImage = false; + OutlineInputBorder? border; + final GlobalKey formKey = GlobalKey(); + + @override + void initState() { + border = OutlineInputBorder( + borderSide: BorderSide( + color: Colors.grey.withOpacity(0.7), + width: 2.0, + ), + ); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Credit Card View Demo', + debugShowCheckedModeBanner: false, + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: Scaffold( + resizeToAvoidBottomInset: false, + body: Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: ExactAssetImage('assets/bg.png'), + fit: BoxFit.fill, + ), + color: Colors.black, + ), + child: SafeArea( + child: Column( + children: [ + const SizedBox( + height: 30, + ), + CreditCardWidget( + glassmorphismConfig: + useGlassMorphism ? Glassmorphism.defaultConfig() : null, + cardNumber: cardNumber, + expiryDate: expiryDate, + cardHolderName: cardHolderName, + cvvCode: cvvCode, + bankName: 'Axis Bank', + frontCardBorder: + !useGlassMorphism ? Border.all(color: Colors.grey) : null, + backCardBorder: + !useGlassMorphism ? Border.all(color: Colors.grey) : null, + showBackView: isCvvFocused, + obscureCardNumber: true, + obscureCardCvv: true, + isHolderNameVisible: true, + + backgroundImage: + useBackgroundImage ? 'assets/card_bg.png' : null, + isSwipeGestureEnabled: true, + onCreditCardWidgetChange: + (CreditCardBrand creditCardBrand) {}, + customCardTypeIcons: [ + CustomCardTypeIcon( + cardType: CardType.mastercard, + cardImage: Image.asset( + 'assets/mastercard.png', + height: 48, + width: 48, + ), + ), + ], + ), + Expanded( + child: SingleChildScrollView( + child: Column( + children: [ + CreditCardForm( + formKey: formKey, + obscureCvv: true, + obscureNumber: true, + cardNumber: cardNumber, + cvvCode: cvvCode, + isHolderNameVisible: true, + isCardNumberVisible: true, + isExpiryDateVisible: true, + cardHolderName: cardHolderName, + expiryDate: expiryDate, + themeColor: Colors.blue, + textColor: Colors.white, + cardNumberDecoration: InputDecoration( + labelText: 'Number', + hintText: 'XXXX XXXX XXXX XXXX', + hintStyle: const TextStyle(color: Colors.white), + labelStyle: const TextStyle(color: Colors.white), + focusedBorder: border, + enabledBorder: border, + ), + expiryDateDecoration: InputDecoration( + hintStyle: const TextStyle(color: Colors.white), + labelStyle: const TextStyle(color: Colors.white), + focusedBorder: border, + enabledBorder: border, + labelText: 'Expired Date', + hintText: 'XX/XX', + ), + cvvCodeDecoration: InputDecoration( + hintStyle: const TextStyle(color: Colors.white), + labelStyle: const TextStyle(color: Colors.white), + focusedBorder: border, + enabledBorder: border, + labelText: 'CVV', + hintText: 'XXX', + ), + cardHolderDecoration: InputDecoration( + hintStyle: const TextStyle(color: Colors.white), + labelStyle: const TextStyle(color: Colors.white), + focusedBorder: border, + enabledBorder: border, + labelText: 'Card Holder', + ), + onCreditCardModelChange: onCreditCardModelChange, + ), + const SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'Glassmorphism', + style: TextStyle( + color: Colors.white, + fontSize: 18, + ), + ), + const Spacer(), + Switch( + value: useGlassMorphism, + inactiveTrackColor: Colors.grey, + activeColor: Colors.white, + + onChanged: (bool value) => setState(() { + useGlassMorphism = value; + }), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'Card Image', + style: TextStyle( + color: Colors.white, + fontSize: 18, + ), + ), + const Spacer(), + Switch( + value: useBackgroundImage, + inactiveTrackColor: Colors.grey, + activeColor: Colors.white, + + onChanged: (bool value) => setState(() { + useBackgroundImage = value; + }), + ), + ], + ), + ), + const SizedBox( + height: 20, + ), + GestureDetector( + onTap: _onValidate, + child: Container( + margin: const EdgeInsets.symmetric( + horizontal: 16, vertical: 8), + + padding: const EdgeInsets.symmetric(vertical: 15), + width: double.infinity, + alignment: Alignment.center, + child: const Text( + 'Validate', + style: TextStyle( + color: Colors.black, + fontFamily: 'halter', + fontSize: 14, + package: 'flutter_credit_card', + ), + ), + ), + ), + OutlinedButton( + style: ButtonStyle( + + foregroundColor: MaterialStateProperty.all(Colors.red), + ), + onPressed: () { }, + child: Text('Complete Setup'), +), + ], + ), + ), + ), + ], + ), + ), + ), + ), + + ); + } + + void _onValidate() { + if (formKey.currentState!.validate()) { + print('valid!'); + } else { + print('invalid!'); + } + } + + void onCreditCardModelChange(CreditCardModel? creditCardModel) { + setState(() { + cardNumber = creditCardModel!.cardNumber; + expiryDate = creditCardModel.expiryDate; + cardHolderName = creditCardModel.cardHolderName; + cvvCode = creditCardModel.cvvCode; + isCvvFocused = creditCardModel.isCvvFocused; + }); + } +} \ No newline at end of file diff --git a/lib/profile_screen_custom.dart b/lib/profile_screen_custom.dart index d30657d..991b7a5 100644 --- a/lib/profile_screen_custom.dart +++ b/lib/profile_screen_custom.dart @@ -8,6 +8,8 @@ import 'package:firebase_auth/firebase_auth.dart' show ActionCodeSettings, Fireb import 'package:flutter/cupertino.dart' hide Title; import 'package:flutter/material.dart'; import 'package:flutter/material.dart' hide Title; +import 'package:flutter/material.dart'; +import 'package:flutter_credit_card/credit_card_brand.dart'; import 'package:flutter_credit_card/flutter_credit_card.dart'; import 'package:flutterfire_ui/auth.dart'; import 'package:flutterfire_ui/src/auth/widgets/internal/loading_button.dart'; @@ -19,6 +21,7 @@ import 'package:flutterfire_ui/src/auth/screens/internal/multi_provider_screen.d import 'package:flutterfire_ui/src/auth/widgets/internal/rebuild_scope.dart'; import 'package:flutterfire_ui/src/auth/widgets/internal/subtitle.dart'; import 'package:flutterfire_ui/src/auth/widgets/internal/universal_icon_button.dart'; +import 'package:ruswipeshare/credit_view.dart'; class EditButton extends StatelessWidget { final bool isEditing; @@ -250,6 +253,13 @@ class ProfileScreenCustom extends MultiProviderScreen { ], ...children, const SizedBox(height: 300), + TextButton( + style: ButtonStyle( + foregroundColor: MaterialStateProperty.all(Colors.red), + ), + onPressed: () {Navigator.push(context, MaterialPageRoute(builder: (context)=> CreditView())); }, + child: Text('Setup Seller'), +), Align( alignment: Alignment.bottomCenter, child: SignOutButton( diff --git a/pubspec.lock b/pubspec.lock index b454d87..5d0bf99 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -259,6 +259,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_stripe: + dependency: "direct main" + description: + name: flutter_stripe + sha256: "00e612c11ea57f9b78510e5b2aa8719022698bd8a023140e9b7f52c1dfa2e27d" + url: "https://pub.dev" + source: hosted + version: "8.0.0+1" flutter_svg: dependency: transitive description: @@ -285,6 +293,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.3+20" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338 + url: "https://pub.dev" + source: hosted + version: "2.2.0" geolocator: dependency: "direct main" description: @@ -405,6 +421,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.5" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + url: "https://pub.dev" + source: hosted + version: "4.8.0" lints: dependency: transitive description: @@ -554,6 +578,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + stripe_android: + dependency: transitive + description: + name: stripe_android + sha256: "3cf43dfb70d8011ded0730c091e741b94cd4aaccaad22732a19f5941503072d6" + url: "https://pub.dev" + source: hosted + version: "8.0.0+1" + stripe_ios: + dependency: transitive + description: + name: stripe_ios + sha256: b3da653013be8aada352b158439024963a0d5dc0648524127d3ef4fd6b0a0cc7 + url: "https://pub.dev" + source: hosted + version: "8.0.0" + stripe_platform_interface: + dependency: transitive + description: + name: stripe_platform_interface + sha256: "28c409b0c0e98115c4ab38a9a34a883010811036e6d9fa8d495f67c3ba01c034" + url: "https://pub.dev" + source: hosted + version: "8.0.0" term_glyph: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 47a5e4d..696c976 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -42,6 +42,7 @@ dependencies: persistent_bottom_nav_bar: any geolocator: ^9.0.2 flutter_credit_card: any + flutter_stripe: any dev_dependencies: flutter_test: From 7e088b0a62ac46a9f8a0fce5babe0d9e391d8a5d Mon Sep 17 00:00:00 2001 From: NATHANIEL ENDICK Date: Sun, 26 Feb 2023 00:21:06 -0500 Subject: [PATCH 6/6] Clicking a buy item navigates to test page --- lib/buy.dart | 112 +++++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 53 deletions(-) diff --git a/lib/buy.dart b/lib/buy.dart index 8ec7578..2e0cb9a 100644 --- a/lib/buy.dart +++ b/lib/buy.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:ruswipeshare/sell.dart'; class BuyScreen extends StatefulWidget { const BuyScreen({Key? key}) : super(key: key); @@ -39,64 +40,70 @@ class OffersListView extends StatelessWidget { return ListView.builder( itemCount: 30, itemBuilder: (BuildContext context, int index) { - return Container( - height: 80, - color: Colors.blue, - margin: const EdgeInsets.only(top: 4, bottom: 4), - child: Row( - children: [ - Expanded( - flex: 7, - child: Container( - color: Colors.red, - margin: EdgeInsets.only(top: 4, left: 4, bottom: 4), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - entries[index % entries.length], - textAlign: TextAlign.start, - overflow: TextOverflow.ellipsis, - style: const TextStyle(fontSize: 24), - ), - Row( - children: [ - Icon(Icons.star, size: 16), - Icon(Icons.star, size: 16), - Icon(Icons.star, size: 16), - Icon(Icons.star_half, size: 16), - Icon(Icons.star_border, size: 16), - ], - ), - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.end, + return InkWell( + onTap: () { + Navigator.push(context, + MaterialPageRoute(builder: (context) => const SellScreen())); + }, + child: Container( + height: 80, + color: Colors.blue, + margin: const EdgeInsets.only(top: 4, bottom: 4), + child: Row( + children: [ + Expanded( + flex: 7, + child: Container( + color: Colors.red, + margin: EdgeInsets.only(top: 4, left: 4, bottom: 4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + entries[index % entries.length], + textAlign: TextAlign.start, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontSize: 24), + ), + Row( children: [ - const Text( - '\88:88PM - 88:88PM', - textAlign: TextAlign.start, - overflow: TextOverflow.ellipsis, - style: const TextStyle(fontSize: 16), - ), + Icon(Icons.star, size: 16), + Icon(Icons.star, size: 16), + Icon(Icons.star, size: 16), + Icon(Icons.star_half, size: 16), + Icon(Icons.star_border, size: 16), ], ), - ) - ], + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + const Text( + '\88:88PM - 88:88PM', + textAlign: TextAlign.start, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontSize: 16), + ), + ], + ), + ) + ], + ), ), ), - ), - Expanded( - flex: 3, - child: Container( - color: Colors.orange, - child: const Text( - '\$88', - textAlign: TextAlign.center, - style: const TextStyle(fontSize: 44), + Expanded( + flex: 3, + child: Container( + color: Colors.orange, + child: const Text( + '\$88', + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 44), + ), ), - ), - ) - ], + ) + ], + ), ), ); }); @@ -105,5 +112,4 @@ class OffersListView extends StatelessWidget { // return Container( // height: 80, // color: Colors.amber[colorCodes[index % colorCodes.length]], -// child: Center(child: Text(entries[index % entries.length])), // ); \ No newline at end of file