-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to 1.1.0 and small bug fixes. Enjoy!
- Loading branch information
1 parent
4b4e0e1
commit ce76b19
Showing
14 changed files
with
416 additions
and
241 deletions.
There are no files selected for viewing
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import 'package:cardabase/util/button_tile.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:barcode_widget/barcode_widget.dart'; | ||
|
||
class GenerateBarcode extends StatelessWidget { | ||
|
||
String cardid; | ||
String cardtext; | ||
Color iconcolor; | ||
|
||
GenerateBarcode({super.key, required this.cardid, required this.cardtext, required this.iconcolor}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
backgroundColor: Theme.of(context).colorScheme.surface, | ||
appBar: AppBar( | ||
leading: IconButton(icon: Icon(Icons.arrow_back_ios_new, color: Theme.of(context).colorScheme.secondary,), onPressed: () => Navigator.of(context).pop(),), | ||
title: Text( | ||
'Details', | ||
style: TextStyle( | ||
fontSize: 20, | ||
fontWeight: FontWeight.w900, | ||
fontFamily: 'xirod', | ||
letterSpacing: 8, | ||
color: Theme.of(context).colorScheme.tertiary, | ||
) | ||
), | ||
centerTitle: true, | ||
elevation: 0.0, | ||
backgroundColor: Theme.of(context).colorScheme.surface, | ||
), | ||
body: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
children: [ | ||
//FRONT FACE | ||
SizedBox( | ||
height: MediaQuery.of(context).size.width / 1.50, //height of button | ||
width: MediaQuery.of(context).size.width, | ||
child: Container( | ||
margin: const EdgeInsets.all(20), | ||
decoration: BoxDecoration(color: iconcolor, borderRadius: BorderRadius.circular(15)), | ||
child: Center( | ||
child: Wrap( | ||
children: [ | ||
Container( | ||
margin: const EdgeInsets.fromLTRB(20, 0, 20, 00), | ||
child: Text( | ||
cardtext, | ||
style: const TextStyle( | ||
fontSize: 50, | ||
fontWeight: FontWeight.bold, | ||
fontFamily: 'Roboto-Regular.ttf', | ||
color: Colors.white, | ||
), | ||
maxLines: 2, | ||
textAlign: TextAlign.center, | ||
), | ||
), | ||
]), | ||
), | ||
) | ||
), | ||
const SizedBox(height: 10,), | ||
//BACK FACE | ||
SizedBox( | ||
height: MediaQuery.of(context).size.width / 1.50, //height of button | ||
width: MediaQuery.of(context).size.width, | ||
child: Container( | ||
padding: const EdgeInsets.all(10), | ||
margin: const EdgeInsets.all(20), | ||
decoration: BoxDecoration(color: iconcolor, borderRadius: BorderRadius.circular(15)), | ||
child: Container( | ||
height: 120, | ||
padding: const EdgeInsets.all(15), | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(10.0), | ||
color: Colors.white), | ||
child: BarcodeWidget( | ||
padding: const EdgeInsets.all(5), | ||
data: cardid, | ||
barcode: Barcode.ean13(drawEndChar: true), | ||
drawText: true, | ||
style: const TextStyle(color: Colors.black), | ||
), | ||
), | ||
) | ||
), | ||
const SizedBox(height: 30,), | ||
ButtonTile(buttonText: 'DONE', buttonAction: () => Navigator.pop(context)), | ||
const SizedBox(height: 30,), | ||
] | ||
), | ||
); | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_bounceable/flutter_bounceable.dart'; | ||
|
||
class ButtonTile extends StatelessWidget { | ||
|
||
final String buttonText; | ||
final buttonAction; | ||
|
||
|
||
const ButtonTile({super.key, required this.buttonText, required this.buttonAction}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Bounceable( | ||
onTap: () {}, | ||
child: Container( | ||
margin: const EdgeInsets.all(20), | ||
alignment: Alignment.center, | ||
child: OutlinedButton( | ||
style: OutlinedButton.styleFrom( | ||
padding: const EdgeInsets.all(15), | ||
side: BorderSide(color: Theme.of(context).colorScheme.primary, width: 2), | ||
backgroundColor: Colors.transparent, | ||
elevation: 0.0, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(10), | ||
), | ||
minimumSize: const Size.fromHeight(65), | ||
), | ||
onPressed: buttonAction, | ||
child: Text(buttonText, style: TextStyle(color: Theme.of(context).colorScheme.tertiary, fontSize: 20, fontFamily: 'Roboto-Regular.ttf',)), | ||
) | ||
), | ||
); | ||
} | ||
} |
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
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
Oops, something went wrong.