stripeMergefix

This commit is contained in:
Hitesh Ale
2023-02-26 11:47:22 -05:00
28 changed files with 692 additions and 120 deletions

BIN
assets/afternoon_swipe.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
assets/bdh.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 KiB

BIN
assets/brower.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
assets/busch_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
assets/ca_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
assets/cafe_west.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

BIN
assets/cd_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

BIN
assets/cook_cafe.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

BIN
assets/daytime_swipe.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

BIN
assets/doug_cafe.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
assets/harvest.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
assets/kilmers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
assets/ldh.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

BIN
assets/livi_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
assets/neilson.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

BIN
assets/nighttime_swipe.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
assets/red_pine.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
assets/sbarros.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
assets/woodys.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
flutter_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

View File

@@ -1,22 +1,14 @@
import 'dart:collection';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:ruswipeshare/sell.dart';
import 'package:material_dialogs/shared/types.dart';
import 'package:material_dialogs/widgets/buttons/icon_button.dart';
import 'package:material_dialogs/widgets/buttons/icon_outline_button.dart';
import 'package:material_dialogs/material_dialogs.dart';
import 'package:ruswipeshare/main.dart';
class BuyScreen extends StatefulWidget {
const BuyScreen({Key? key}) : super(key: key);
@override
_BuyScreenState createState() => _BuyScreenState();
}
class _BuyScreenState extends State<BuyScreen> {
@override
Widget build(BuildContext context) {
TimeOfDay _time = TimeOfDay.now();
return Scaffold(
body: const OffersListView(),
);
}
}
enum CampusState { campuses, list_options, offers }
final List<String> entries = <String>[
'Antoinette Beauchamp',
@@ -30,86 +22,474 @@ final List<String> entries = <String>[
'Pearl Morse',
'Jana Munguia'
];
final Map<String, String> nameToAsset = {
'Brower Dining Hall': 'brower.jpg',
'Cafe West': 'cafe_west.jpg',
'Busch Dining Hall': 'bdh.jpg',
'Woody\'s Cafe': 'woodys.jpg',
'Livingston Dining Hall': 'ldh.jpg',
'Kilmer\'s Market': 'kilmers.png',
'Sbarro\'s': 'sbarros.jpg',
'Neilson Dining Hall': 'neilson.jpg',
'Cook Cafe': 'cook_cafe.jpg',
'Douglass Cafe': 'doug_cafe.jpg',
'Harvest INFH': 'harvest.jpg',
'Red Pine Pizza': 'red_pine.jpg'
};
final List<List<String>> eatingLocations = [
<String>['Brower Dining Hall', 'Cafe West'],
<String>['Busch Dining Hall', 'Woody\'s Cafe'],
<String>[
'Livingston Dining Hall',
'Kilmer\'s Market',
'Sbarro\'s',
],
<String>[
'Neilson Dining Hall',
'Cook Cafe',
'Douglass Cafe',
'Harvest INFH',
'Red Pine Pizza'
]
];
final List<int> colorCodes = <int>[600, 500, 100];
final List<String> timeBgAssets = <String>[
'assets/daytime_swipe.jpg',
'assets/afternoon_swipe.jpg',
'assets/nighttime_swipe.jpg'
];
class OffersListView extends StatelessWidget {
const OffersListView({super.key});
class BuyScreen extends StatefulWidget {
const BuyScreen({Key? key}) : super(key: key);
@override
_BuyScreenState createState() => _BuyScreenState();
}
class _BuyScreenState extends State<BuyScreen> {
CampusState _currentState = CampusState.campuses;
List<String> _diningOptions = List.empty();
String _selectedLocation = "";
@override
Widget build(BuildContext context) {
return ListView.builder(
itemCount: 30,
itemBuilder: (BuildContext context, int index) {
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: [
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),
),
],
switch (_currentState) {
case CampusState.campuses:
return Scaffold(
body: Column(
children: [
Expanded(
child: Center(
child: GridView.count(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
crossAxisCount: 2,
crossAxisSpacing: 15,
childAspectRatio: 0.8,
mainAxisSpacing: 20,
padding: const EdgeInsets.all(10),
children: [
InkWell(
onTap: () {
setState(() {
_currentState = CampusState.list_options;
_diningOptions = eatingLocations[0];
});
},
child: ClipRRect(
borderRadius:
const BorderRadius.all(Radius.circular(25)),
child: Column(
children: [
Expanded(
child: Image.asset(
'assets/ca_bg.jpg',
fit: BoxFit.cover,
),
),
)
],
Container(
width: double.infinity,
padding: const EdgeInsets.all(8),
color: Colors.red,
child: const Text(
"College Avenue",
textAlign: TextAlign.center,
),
),
],
),
),
),
),
Expanded(
flex: 3,
child: Container(
color: Colors.orange,
child: const Text(
'\$88',
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 44),
InkWell(
onTap: () {
setState(() {
_currentState = CampusState.list_options;
_diningOptions = eatingLocations[1];
});
},
child: ClipRRect(
borderRadius:
const BorderRadius.all(Radius.circular(25)),
child: Column(
children: [
Expanded(
child: Image.asset(
'assets/busch_bg.jpg',
fit: BoxFit.cover,
),
),
Container(
width: double.infinity,
padding: const EdgeInsets.all(8),
color: Colors.red,
child: const Text(
"Busch",
textAlign: TextAlign.center,
),
),
],
),
),
),
)
],
),
InkWell(
onTap: () {
setState(() {
_currentState = CampusState.list_options;
_diningOptions = eatingLocations[2];
});
},
child: ClipRRect(
borderRadius:
const BorderRadius.all(Radius.circular(25)),
child: Column(
children: [
Expanded(
child: Image.asset(
'assets/livi_bg.jpg',
fit: BoxFit.cover,
),
),
Container(
width: double.infinity,
padding: const EdgeInsets.all(8),
color: Colors.red,
child: const Text(
"Livi",
textAlign: TextAlign.center,
),
),
],
),
),
),
InkWell(
onTap: () {
setState(() {
_currentState = CampusState.list_options;
_diningOptions = eatingLocations[3];
});
},
child: ClipRRect(
borderRadius:
const BorderRadius.all(Radius.circular(25)),
child: Column(
children: [
Expanded(
child: Image.asset(
'assets/cd_bg.jpg',
fit: BoxFit.cover,
),
),
Container(
width: double.infinity,
padding: const EdgeInsets.all(8),
color: Colors.red,
child: const Text(
"Cook-Douglass",
textAlign: TextAlign.center,
),
),
],
),
),
),
],
),
)),
],
),
);
case CampusState.list_options:
return Scaffold(
body: Column(children: [
Container(
width: double.infinity,
child: ElevatedButton(
onPressed: () {
setState(() {
_currentState = CampusState.campuses;
});
},
child: const Text("Choose A Different Location")),
),
);
});
Expanded(
child: ListView.builder(
physics: const BouncingScrollPhysics(),
itemCount: _diningOptions.length,
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: const EdgeInsets.all(4),
decoration: BoxDecoration(
border: Border.all(
color: CustomMaterialColor(240, 240, 240).mdColor,
width: 2),
borderRadius:
const BorderRadius.all(Radius.circular(40))),
child: InkWell(
onTap: () {
setState(() {
_currentState = CampusState.offers;
_selectedLocation = _diningOptions.elementAt(index);
});
},
child: ClipRRect(
borderRadius:
const BorderRadius.all(Radius.circular(40)),
child: Container(
height: 80,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage("assets/" +
nameToAsset[
_diningOptions.elementAt(index)]!),
)),
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 3, sigmaY: 3),
child: Container(
padding: const EdgeInsets.only(right: 40),
alignment: Alignment.bottomRight,
margin: const EdgeInsets.only(
top: 4, left: 20, bottom: 4),
child: Text(
_diningOptions[index],
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontSize: 24),
),
),
),
),
),
),
);
}),
)
]),
);
case CampusState.offers:
return Scaffold(
body: Column(
children: [
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
Flexible(
flex: 8,
fit: FlexFit.tight,
child: ElevatedButton(
onPressed: () {
setState(() {
_currentState = CampusState.campuses;
});
},
child: const Text("Choose A Different Location")),
),
Flexible(
flex: 2,
child: ElevatedButton(
onPressed: () {}, child: const Icon(Icons.filter_list)))
]),
Expanded(
child: ListView.builder(
physics: const BouncingScrollPhysics(),
itemCount: 30,
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) => Dialog(
backgroundColor:
Theme.of(context).scaffoldBackgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(20))),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
const Text('Transaction Details'),
const SizedBox(height: 15),
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text('Close'),
),
],
),
)));
// Dialogs.materialDialog(
// color: Theme.of(context).scaffoldBackgroundColor,
// customView: const TransactionDetails(),
// customViewPosition:
// CustomViewPosition.BEFORE_ACTION,
// msgAlign: TextAlign.center,
// msg:
// 'Please read all the information below before purchasing.\n',
// title: 'Transaction Details',
// context: context,
// actions: [
// IconsOutlineButton(
// onPressed: () {},
// text: 'Cancel',
// iconData: Icons.cancel_outlined,
// color: Theme.of(context).primaryColor,
// textStyle: TextStyle(
// color: CustomMaterialColor(240, 240, 240)
// .mdColor,
// ),
// iconColor: CustomMaterialColor(240, 240, 240)
// .mdColor),
// IconsButton(
// onPressed: () {},
// text: 'Purchase',
// iconData: Icons.done,
// color: Colors.green,
// textStyle: TextStyle(
// color: CustomMaterialColor(240, 240, 240)
// .mdColor,
// ),
// iconColor: CustomMaterialColor(240, 240, 240)
// .mdColor),
// ],
// );
},
child: Container(
decoration: BoxDecoration(
border: Border.all(
color: CustomMaterialColor(240, 240, 240)
.mdColor,
width: 2),
borderRadius:
const BorderRadius.all(Radius.circular(40))),
margin: const EdgeInsets.all(4),
height: 80,
child: ClipRRect(
borderRadius:
const BorderRadius.all(Radius.circular(40)),
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
colorFilter: const ColorFilter.mode(
Colors.black26, BlendMode.darken),
fit: BoxFit.cover,
image: AssetImage(timeBgAssets[index % 3]),
)),
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 2, sigmaY: 2),
child: Row(
children: [
Expanded(
flex: 7,
child: Container(
padding: EdgeInsets.only(left: 20),
// color: Colors.red,
margin: const 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: 20),
),
Row(
children: const [
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:
TextStyle(fontSize: 16),
),
],
),
)
],
),
),
),
Expanded(
flex: 3,
child: Container(
padding: EdgeInsets.only(right: 15),
child: Text(
'\$88',
textAlign: TextAlign.end,
style: TextStyle(fontSize: 44),
),
),
),
],
),
),
),
),
),
);
}),
),
],
),
);
}
}
}
class TransactionDetails extends StatefulWidget {
const TransactionDetails({super.key});
@override
State<TransactionDetails> createState() => _TransactionDetailsState();
}
class _TransactionDetailsState extends State<TransactionDetails> {
@override
Widget build(BuildContext context) {
return Container(
height: 200,
color: Colors.blue,
);
}
}
// return Container(
// height: 80,
// color: Colors.amber[colorCodes[index % colorCodes.length]],
// );

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart';
import 'package:ruswipeshare/buy.dart';
import 'package:ruswipeshare/main.dart';
import 'package:ruswipeshare/sell.dart';
import 'profile_screen_custom.dart';
import 'main_screen.dart';
@@ -31,14 +32,13 @@ class _HomeScreenState extends State<HomeScreen> {
PersistentBottomNavBarItem(
icon: const Icon(Icons.shopping_cart),
title: "Buy",
activeColorPrimary: Colors.blue,
inactiveColorPrimary: Colors.grey,
inactiveColorSecondary: Colors.purple),
activeColorPrimary: CustomMaterialColor(240, 240, 240).mdColor,
inactiveColorPrimary: Colors.black38),
PersistentBottomNavBarItem(
icon: const Icon(Icons.attach_money),
title: "Sell",
activeColorPrimary: Colors.teal,
inactiveColorPrimary: Colors.grey,
activeColorPrimary: CustomMaterialColor(240, 240, 240).mdColor,
inactiveColorPrimary: Colors.black38,
routeAndNavigatorSettings: const RouteAndNavigatorSettings(
initialRoute: "/",
),
@@ -46,8 +46,8 @@ class _HomeScreenState extends State<HomeScreen> {
PersistentBottomNavBarItem(
icon: const Icon(Icons.person),
title: "Profile",
activeColorPrimary: Colors.blueAccent,
inactiveColorPrimary: Colors.grey,
activeColorPrimary: CustomMaterialColor(240, 240, 240).mdColor,
inactiveColorPrimary: Colors.black38,
routeAndNavigatorSettings: const RouteAndNavigatorSettings(
initialRoute: "/",
),
@@ -55,8 +55,8 @@ class _HomeScreenState extends State<HomeScreen> {
PersistentBottomNavBarItem(
icon: const Icon(Icons.settings),
title: "Settings",
activeColorPrimary: Colors.indigo,
inactiveColorPrimary: Colors.grey,
activeColorPrimary: CustomMaterialColor(240, 240, 240).mdColor,
inactiveColorPrimary: Colors.black38,
routeAndNavigatorSettings: const RouteAndNavigatorSettings(
initialRoute: "/",
),
@@ -71,17 +71,21 @@ class _HomeScreenState extends State<HomeScreen> {
screens: _buildScreens(),
items: _navBarsItems(),
confineInSafeArea: true,
backgroundColor: Colors.white, // Default is Colors.white.
backgroundColor:
Theme.of(context).primaryColor, // Default is Colors.white.
handleAndroidBackButtonPress: true, // Default is true.
resizeToAvoidBottomInset:
true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true.
stateManagement: true, // Default is true.
hideNavigationBarWhenKeyboardShows:
true, // Recommended to set 'resizeToAvoidBottomInset' as true while using this argument. Default is true.
decoration: NavBarDecoration(
borderRadius: BorderRadius.circular(10.0),
colorBehindNavBar: Colors.white,
),
decoration: const NavBarDecoration(
// border: Border(
// top: BorderSide(width: 2.0, color: Colors.white),
// ),
// borderRadius: BorderRadius.circular(10.0),
// colorBehindNavBar: Colors.white,
),
popAllScreensOnTapOfSelectedTab: true,
popActionScreens: PopActionScreensType.all,
itemAnimationProperties: const ItemAnimationProperties(

View File

@@ -1,6 +1,7 @@
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_stripe/flutter_stripe.dart';
import 'package:google_fonts/google_fonts.dart';
import 'firebase_options.dart';
import 'auth_gate.dart';
@@ -19,8 +20,17 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primarySwatch: CustomMaterialColor(200, 61, 61).mdColor,
),
primarySwatch: CustomMaterialColor(205, 0, 48).mdColor,
scaffoldBackgroundColor: Colors.black87,
fontFamily: GoogleFonts.figtree().fontFamily,
textTheme: Theme.of(context).textTheme.apply(
bodyColor: CustomMaterialColor(240, 240, 240).mdColor,
displayColor: CustomMaterialColor(240, 240, 240).mdColor,
),
textButtonTheme: TextButtonThemeData(
style: ButtonStyle(
textStyle: MaterialStatePropertyAll(TextStyle(
color: CustomMaterialColor(240, 240, 240).mdColor))))),
home: const AuthGate(),
);
}

View File

@@ -6,7 +6,8 @@
import 'dart:convert';
import 'package:firebase_auth/firebase_auth.dart' show ActionCodeSettings, FirebaseAuth, FirebaseAuthException, User;
import 'package:firebase_auth/firebase_auth.dart'
show ActionCodeSettings, FirebaseAuth, FirebaseAuthException, User;
import 'package:flutter/cupertino.dart' hide Title;
import 'package:flutter/material.dart';
import 'package:flutter/material.dart' hide Title;
@@ -84,7 +85,9 @@ class _EmailVerificationBadgeState extends State<EmailVerificationBadge> {
@override
Widget build(BuildContext context) {
if (state == EmailVerificationState.dismissed || state == EmailVerificationState.unresolved || state == EmailVerificationState.verified) {
if (state == EmailVerificationState.dismissed ||
state == EmailVerificationState.unresolved ||
state == EmailVerificationState.verified) {
return const SizedBox.shrink();
}
@@ -104,7 +107,10 @@ class _EmailVerificationBadgeState extends State<EmailVerificationBadge> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Subtitle(
text: state == EmailVerificationState.sent || state == EmailVerificationState.pending ? 'Verification email sent' : 'Email is not verified',
text: state == EmailVerificationState.sent ||
state == EmailVerificationState.pending
? 'Verification email sent'
: 'Email is not verified',
fontWeight: FontWeight.bold,
),
if (state == EmailVerificationState.pending) ...[
@@ -134,7 +140,8 @@ class _EmailVerificationBadgeState extends State<EmailVerificationBadge> {
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
if (state != EmailVerificationState.sent && state != EmailVerificationState.sending)
if (state != EmailVerificationState.sent &&
state != EmailVerificationState.sending)
UniversalButton(
variant: ButtonVariant.text,
color: Theme.of(context).colorScheme.error,
@@ -206,11 +213,15 @@ class ProfileScreenCustom extends MultiProviderScreen {
}
List<ProviderConfiguration> getLinkedProviders(User user) {
return providerConfigs.where((config) => user.isProviderLinked(config.providerId)).toList();
return providerConfigs
.where((config) => user.isProviderLinked(config.providerId))
.toList();
}
List<ProviderConfiguration> getAvailableProviders(User user) {
return providerConfigs.where((config) => !user.isProviderLinked(config.providerId)).toList();
return providerConfigs
.where((config) => !user.isProviderLinked(config.providerId))
.toList();
}
@override

View File

@@ -38,7 +38,7 @@ class _SellScreenState extends State<SellScreen> {
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
children: const [
Icon(Icons.store_mall_directory, color: Colors.red),
Text('Place'),
],
@@ -60,7 +60,7 @@ class _SellScreenState extends State<SellScreen> {
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
children: const [
Icon(Icons.access_time, color: Colors.red),
Text('Time'),
],
@@ -94,10 +94,19 @@ class _SellScreenState extends State<SellScreen> {
context: context,
initialTime: TimeOfDay.fromDateTime(startTimeTime),
);
if (picked != null && picked != TimeOfDay.fromDateTime(startTimeTime)) {
if (picked != null &&
picked != TimeOfDay.fromDateTime(startTimeTime)) {
setState(() {
startTimeTime = DateTime.fromMicrosecondsSinceEpoch(picked.hour * 60 * 60 * 1000000 + picked.minute * 60 * 1000000, isUtc: true);
startTime = startTimeTime.hour.toString() + ":" + startTimeTime.minute.toString() + ((is24HoursFormat) ? "" : ((startTimeTime.hour > 12) ? "PM" : "AM"));
startTimeTime = DateTime.fromMicrosecondsSinceEpoch(
picked.hour * 60 * 60 * 1000000 +
picked.minute * 60 * 1000000,
isUtc: true);
startTime = startTimeTime.hour.toString() +
":" +
startTimeTime.minute.toString() +
((is24HoursFormat)
? ""
: ((startTimeTime.hour > 12) ? "PM" : "AM"));
});
}
},
@@ -109,10 +118,19 @@ class _SellScreenState extends State<SellScreen> {
context: context,
initialTime: TimeOfDay.fromDateTime(endTimeTime),
);
if (picked != null && picked != TimeOfDay.fromDateTime(endTimeTime)) {
if (picked != null &&
picked != TimeOfDay.fromDateTime(endTimeTime)) {
setState(() {
endTimeTime = DateTime.fromMicrosecondsSinceEpoch(picked.hour * 60 * 60 * 1000000 + picked.minute * 60 * 1000000, isUtc: true);
endTime = endTimeTime.hour.toString() + ":" + endTimeTime.minute.toString() + ((is24HoursFormat) ? "" : ((endTimeTime.hour > 12) ? "PM" : "AM"));
endTimeTime = DateTime.fromMicrosecondsSinceEpoch(
picked.hour * 60 * 60 * 1000000 +
picked.minute * 60 * 1000000,
isUtc: true);
endTime = endTimeTime.hour.toString() +
":" +
endTimeTime.minute.toString() +
((is24HoursFormat)
? ""
: ((endTimeTime.hour > 12) ? "PM" : "AM"));
});
}
},
@@ -122,7 +140,7 @@ class _SellScreenState extends State<SellScreen> {
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
children: const [
Icon(Icons.attach_money, color: Colors.red),
Text('Cost'),
],
@@ -154,7 +172,8 @@ class _SellScreenState extends State<SellScreen> {
ElevatedButton(
onPressed: () {},
style: ButtonStyle(
backgroundColor: MaterialStateColor.resolveWith((states) => Colors.blue),
backgroundColor:
MaterialStateColor.resolveWith((states) => Colors.blue),
),
child: const Text('Next'),
),

View File

@@ -11,6 +11,7 @@ import firebase_auth
import firebase_core
import firebase_database
import geolocator_apple
import path_provider_foundation
import sign_in_with_apple
import twitter_login
@@ -21,6 +22,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseDatabasePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseDatabasePlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin"))
TwitterLoginPlugin.register(with: registry.registrar(forPlugin: "TwitterLoginPlugin"))
}

View File

@@ -9,6 +9,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.16"
archive:
dependency: transitive
description:
name: archive
sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d
url: "https://pub.dev"
source: hosted
version: "3.3.6"
async:
dependency: transitive
description:
@@ -73,6 +81,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.17.0"
convert:
dependency: transitive
description:
name: convert
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
url: "https://pub.dev"
source: hosted
version: "3.1.1"
crypto:
dependency: transitive
description:
@@ -113,6 +129,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
url: "https://pub.dev"
source: hosted
version: "2.0.1"
file:
dependency: transitive
description:
name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
url: "https://pub.dev"
source: hosted
version: "6.1.4"
firebase_auth:
dependency: "direct main"
description:
@@ -349,6 +381,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.1.1"
google_fonts:
dependency: "direct main"
description:
name: google_fonts
sha256: "927573f2e8a8d65c17931e21918ad0ab0666b1b636537de7c4932bdb487b190f"
url: "https://pub.dev"
source: hosted
version: "4.0.3"
google_sign_in:
dependency: transitive
description:
@@ -437,6 +477,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
lottie:
dependency: transitive
description:
name: lottie
sha256: "49bbc544e44bf0c734ccda29b182e3516a12f5021ea98b206cf31a168b0f97da"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
matcher:
dependency: transitive
description:
@@ -453,6 +501,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.2.0"
material_dialogs:
dependency: "direct main"
description:
name: material_dialogs
sha256: "7828b8e70e5227c1fc2bcdf5c3ac4f22049b9ead6bae96a44ca55a4c7b8da949"
url: "https://pub.dev"
source: hosted
version: "1.1.4"
meta:
dependency: transitive
description:
@@ -485,6 +541,54 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.1"
path_provider:
dependency: transitive
description:
name: path_provider
sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9"
url: "https://pub.dev"
source: hosted
version: "2.0.13"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "7623b7d4be0f0f7d9a8b5ee6879fc13e4522d4c875ab86801dee4af32b54b83e"
url: "https://pub.dev"
source: hosted
version: "2.0.23"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: eec003594f19fe2456ea965ae36b3fc967bc5005f508890aafe31fa75e41d972
url: "https://pub.dev"
source: hosted
version: "2.1.2"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: "525ad5e07622d19447ad740b1ed5070031f7a5437f44355ae915ff56e986429a"
url: "https://pub.dev"
source: hosted
version: "2.1.9"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec"
url: "https://pub.dev"
source: hosted
version: "2.0.6"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: "642ddf65fde5404f83267e8459ddb4556316d3ee6d511ed193357e25caa3632d"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
persistent_bottom_nav_bar:
dependency: "direct main"
description:
@@ -501,6 +605,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.1.0"
platform:
dependency: transitive
description:
name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
@@ -509,6 +621,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
pointycastle:
dependency: transitive
description:
name: pointycastle
sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346
url: "https://pub.dev"
source: hosted
version: "3.6.2"
process:
dependency: transitive
description:
name: process
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
url: "https://pub.dev"
source: hosted
version: "4.2.4"
quiver:
dependency: transitive
description:
@@ -642,6 +770,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
win32:
dependency: transitive
description:
name: win32
sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46
url: "https://pub.dev"
source: hosted
version: "3.1.3"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1
url: "https://pub.dev"
source: hosted
version: "1.0.0"
xml:
dependency: transitive
description:
@@ -652,4 +796,4 @@ packages:
version: "6.2.2"
sdks:
dart: ">=2.19.2 <3.0.0"
flutter: ">=3.0.0"
flutter: ">=3.3.0"

View File

@@ -43,6 +43,8 @@ dependencies:
geolocator: ^9.0.2
flutter_credit_card: any
flutter_stripe: any
material_dialogs: any
google_fonts: ^4.0.3
http: any
dev_dependencies: