Created
January 17, 2024 08:33
-
-
Save SteveOye/b4cc896c1c273e20ce2b82f43e122ef0 to your computer and use it in GitHub Desktop.
List
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:app/src/common_widgets/app_bar_text_title.dart'; | |
import 'package:app/src/constant/app_colors.dart'; | |
import 'package:app/src/utils/size_config.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_svg/flutter_svg.dart'; | |
import '../../common_widgets/wallet_cards.dart'; | |
import '../../constant/app_assets.dart'; | |
class TransactionHistoryScreen extends StatefulWidget { | |
const TransactionHistoryScreen({super.key}); | |
@override | |
State<TransactionHistoryScreen> createState() => | |
_TransactionHistoryScreenState(); | |
} | |
class _TransactionHistoryScreenState extends State<TransactionHistoryScreen> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: const PreferredSize( | |
preferredSize: Size.fromHeight(50.0), | |
child: AppBarTextTitle( | |
title: 'Transaction History', | |
), | |
), | |
body: Container( | |
color: AppColors.miscWhite, | |
padding: const EdgeInsets.fromLTRB(24, 16, 24, 16), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
mainAxisAlignment: MainAxisAlignment.start, | |
children: [ | |
const Text( | |
'Transactions', | |
style: TextStyle( | |
fontFamily: 'TomatoGrotesk', | |
fontSize: 14, | |
fontWeight: FontWeight.w600, | |
), | |
), | |
SizedBox( | |
height: getProportionateScreenHeight(8), | |
), | |
Container( | |
padding: const EdgeInsets.only(left: 16, right: 16), | |
decoration: const BoxDecoration( | |
color: Colors.red, | |
borderRadius: BorderRadius.all( | |
Radius.circular(16), | |
)), | |
child: Center( | |
child: SizedBox( | |
child: ListView.builder( | |
shrinkWrap: true, | |
itemCount: 2, | |
itemBuilder: (context, index) { | |
return Container( | |
color: Colors.amberAccent, | |
child: Text('Here'), | |
); | |
}, | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Turn shrinkwrap to false… most times ListTile are always used inside a listview unless you have your own need for modification