mirror of
https://github.com/SoPat712/RUSwipeShare.git
synced 2025-08-21 19:08:46 -04:00
fix display name in database
This commit is contained in:
@@ -17,7 +17,7 @@ class PriceRange {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Seller implements Comparable<Seller> {
|
class Seller implements Comparable<Seller> {
|
||||||
String name = "";
|
String? name = "Unknown Seller";
|
||||||
String uid = "";
|
String uid = "";
|
||||||
List<dynamic> location;
|
List<dynamic> location;
|
||||||
TimeRange availableTime;
|
TimeRange availableTime;
|
||||||
|
@@ -46,7 +46,8 @@ class _SellScreenState extends State<SellScreen> {
|
|||||||
resizeToAvoidBottomInset: true,
|
resizeToAvoidBottomInset: true,
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
|
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
|
||||||
child: Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
child:
|
||||||
|
Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: const [
|
children: const [
|
||||||
@@ -101,7 +102,9 @@ class _SellScreenState extends State<SellScreen> {
|
|||||||
children: [
|
children: [
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
DatePicker.showDateTimePicker(context, showTitleActions: true, minTime: DateTime.now(), onChanged: (date) {
|
DatePicker.showDateTimePicker(context,
|
||||||
|
showTitleActions: true,
|
||||||
|
minTime: DateTime.now(), onChanged: (date) {
|
||||||
print('change $date');
|
print('change $date');
|
||||||
}, onConfirm: (date) {
|
}, onConfirm: (date) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -125,7 +128,9 @@ class _SellScreenState extends State<SellScreen> {
|
|||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
DatePicker.showDateTimePicker(context, showTitleActions: true, minTime: DateTime.now(), onChanged: (date) {
|
DatePicker.showDateTimePicker(context,
|
||||||
|
showTitleActions: true,
|
||||||
|
minTime: DateTime.now(), onChanged: (date) {
|
||||||
print('change $date');
|
print('change $date');
|
||||||
}, onConfirm: (date) {
|
}, onConfirm: (date) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -178,14 +183,19 @@ class _SellScreenState extends State<SellScreen> {
|
|||||||
if (value == true) locations.add(key);
|
if (value == true) locations.add(key);
|
||||||
});
|
});
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
Seller seller = Seller("", user.uid, locations, TimeRange(Timestamp.fromDate(startTimeTime), Timestamp.fromDate(endTimeTime)), double.parse(priceController.text));
|
Seller seller = Seller(
|
||||||
print("SIFSIFISFHJIS");
|
user.displayName,
|
||||||
print(seller);
|
user.uid,
|
||||||
|
locations,
|
||||||
|
TimeRange(Timestamp.fromDate(startTimeTime),
|
||||||
|
Timestamp.fromDate(endTimeTime)),
|
||||||
|
double.parse(priceController.text));
|
||||||
addSeller(seller);
|
addSeller(seller);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
backgroundColor: MaterialStateColor.resolveWith((states) => Colors.blue),
|
backgroundColor:
|
||||||
|
MaterialStateColor.resolveWith((states) => Colors.blue),
|
||||||
),
|
),
|
||||||
child: const Text('Submit Sell Request'),
|
child: const Text('Submit Sell Request'),
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user