Clicking a buy item navigates to test page

This commit is contained in:
NATHANIEL ENDICK
2023-02-26 00:21:06 -05:00
parent 060216cd7c
commit 7e088b0a62

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:ruswipeshare/sell.dart';
class BuyScreen extends StatefulWidget { class BuyScreen extends StatefulWidget {
const BuyScreen({Key? key}) : super(key: key); const BuyScreen({Key? key}) : super(key: key);
@@ -39,64 +40,70 @@ class OffersListView extends StatelessWidget {
return ListView.builder( return ListView.builder(
itemCount: 30, itemCount: 30,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Container( return InkWell(
height: 80, onTap: () {
color: Colors.blue, Navigator.push(context,
margin: const EdgeInsets.only(top: 4, bottom: 4), MaterialPageRoute(builder: (context) => const SellScreen()));
child: Row( },
children: [ child: Container(
Expanded( height: 80,
flex: 7, color: Colors.blue,
child: Container( margin: const EdgeInsets.only(top: 4, bottom: 4),
color: Colors.red, child: Row(
margin: EdgeInsets.only(top: 4, left: 4, bottom: 4), children: [
child: Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, flex: 7,
children: [ child: Container(
Text( color: Colors.red,
entries[index % entries.length], margin: EdgeInsets.only(top: 4, left: 4, bottom: 4),
textAlign: TextAlign.start, child: Column(
overflow: TextOverflow.ellipsis, crossAxisAlignment: CrossAxisAlignment.start,
style: const TextStyle(fontSize: 24), children: [
), Text(
Row( entries[index % entries.length],
children: [ textAlign: TextAlign.start,
Icon(Icons.star, size: 16), overflow: TextOverflow.ellipsis,
Icon(Icons.star, size: 16), style: const TextStyle(fontSize: 24),
Icon(Icons.star, size: 16), ),
Icon(Icons.star_half, size: 16), Row(
Icon(Icons.star_border, size: 16),
],
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
const Text( Icon(Icons.star, size: 16),
'\88:88PM - 88:88PM', Icon(Icons.star, size: 16),
textAlign: TextAlign.start, Icon(Icons.star, size: 16),
overflow: TextOverflow.ellipsis, Icon(Icons.star_half, size: 16),
style: const TextStyle(fontSize: 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(
Expanded( flex: 3,
flex: 3, child: Container(
child: Container( color: Colors.orange,
color: Colors.orange, child: const Text(
child: const Text( '\$88',
'\$88', textAlign: TextAlign.center,
textAlign: TextAlign.center, style: const TextStyle(fontSize: 44),
style: const TextStyle(fontSize: 44), ),
), ),
), )
) ],
], ),
), ),
); );
}); });
@@ -105,5 +112,4 @@ class OffersListView extends StatelessWidget {
// return Container( // return Container(
// height: 80, // height: 80,
// color: Colors.amber[colorCodes[index % colorCodes.length]], // color: Colors.amber[colorCodes[index % colorCodes.length]],
// child: Center(child: Text(entries[index % entries.length])),
// ); // );