mirror of
https://github.com/SoPat712/RUSwipeShare.git
synced 2025-08-21 19:08:46 -04:00
dialog stuff
This commit is contained in:
63
lib/buy.dart
63
lib/buy.dart
@@ -1,5 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.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:ruswipeshare/sell.dart';
|
import 'package:ruswipeshare/sell.dart';
|
||||||
|
import 'package:material_dialogs/material_dialogs.dart';
|
||||||
|
|
||||||
class BuyScreen extends StatefulWidget {
|
class BuyScreen extends StatefulWidget {
|
||||||
const BuyScreen({Key? key}) : super(key: key);
|
const BuyScreen({Key? key}) : super(key: key);
|
||||||
@@ -42,8 +46,32 @@ class OffersListView extends StatelessWidget {
|
|||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context,
|
Dialogs.materialDialog(
|
||||||
MaterialPageRoute(builder: (context) => const SellScreen()));
|
color: Colors.white,
|
||||||
|
customView: TransactionDetails(),
|
||||||
|
customViewPosition: CustomViewPosition.BEFORE_ACTION,
|
||||||
|
msg: 'Please read all the information below before purchasing.',
|
||||||
|
title: 'Transaction Details',
|
||||||
|
context: context,
|
||||||
|
actions: [
|
||||||
|
IconsOutlineButton(
|
||||||
|
onPressed: () {
|
||||||
|
},
|
||||||
|
text: 'Cancel',
|
||||||
|
iconData: Icons.cancel_outlined,
|
||||||
|
textStyle: TextStyle(color: Colors.grey),
|
||||||
|
iconColor: Colors.grey,
|
||||||
|
),
|
||||||
|
IconsButton(
|
||||||
|
onPressed: () {},
|
||||||
|
text: 'Purchase',
|
||||||
|
iconData: Icons.done,
|
||||||
|
color: Colors.blue,
|
||||||
|
textStyle: TextStyle(color: Colors.white),
|
||||||
|
iconColor: Colors.white,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 80,
|
height: 80,
|
||||||
@@ -66,7 +94,7 @@ class OffersListView extends StatelessWidget {
|
|||||||
style: const TextStyle(fontSize: 24),
|
style: const TextStyle(fontSize: 24),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: const [
|
||||||
Icon(Icons.star, size: 16),
|
Icon(Icons.star, size: 16),
|
||||||
Icon(Icons.star, size: 16),
|
Icon(Icons.star, size: 16),
|
||||||
Icon(Icons.star, size: 16),
|
Icon(Icons.star, size: 16),
|
||||||
@@ -77,12 +105,12 @@ class OffersListView extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: const [
|
||||||
const Text(
|
Text(
|
||||||
'\88:88PM - 88:88PM',
|
'88:88PM - 88:88PM',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: const TextStyle(fontSize: 16),
|
style: TextStyle(fontSize: 16),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -109,7 +137,20 @@ class OffersListView extends StatelessWidget {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// return Container(
|
|
||||||
// height: 80,
|
class TransactionDetails extends StatefulWidget {
|
||||||
// color: Colors.amber[colorCodes[index % colorCodes.length]],
|
const TransactionDetails({super.key});
|
||||||
// );
|
|
||||||
|
@override
|
||||||
|
State<TransactionDetails> createState() => _TransactionDetailsState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TransactionDetailsState extends State<TransactionDetails> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
height: 80,
|
||||||
|
color: Colors.blue,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
42
pubspec.lock
42
pubspec.lock
@@ -9,6 +9,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.16"
|
version: "1.0.16"
|
||||||
|
archive:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: archive
|
||||||
|
sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.3.6"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -73,6 +81,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.17.0"
|
version: "1.17.0"
|
||||||
|
convert:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: convert
|
||||||
|
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.1"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -437,6 +453,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
|
lottie:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: lottie
|
||||||
|
sha256: "49bbc544e44bf0c734ccda29b182e3516a12f5021ea98b206cf31a168b0f97da"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -453,6 +477,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
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:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -509,6 +541,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.4"
|
||||||
|
pointycastle:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pointycastle
|
||||||
|
sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.6.2"
|
||||||
quiver:
|
quiver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -652,4 +692,4 @@ packages:
|
|||||||
version: "6.2.2"
|
version: "6.2.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.19.2 <3.0.0"
|
dart: ">=2.19.2 <3.0.0"
|
||||||
flutter: ">=3.0.0"
|
flutter: ">=3.3.0"
|
||||||
|
@@ -43,6 +43,7 @@ dependencies:
|
|||||||
geolocator: ^9.0.2
|
geolocator: ^9.0.2
|
||||||
flutter_credit_card: any
|
flutter_credit_card: any
|
||||||
flutter_stripe: any
|
flutter_stripe: any
|
||||||
|
material_dialogs: any
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
Reference in New Issue
Block a user