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
// Tailwind plugin for forms. | |
// Basically: https://github.com/tailwindlabs/tailwindcss-forms/blob/main/src/index.js | |
// But with a few changes. And it's easier to maintain this way. | |
const svgToDataUri = require("mini-svg-data-uri") | |
const plugin = require("tailwindcss/plugin") | |
const defaultTheme = require("tailwindcss/defaultTheme") | |
const colors = require("tailwindcss/colors") | |
const [baseFontSize, { lineHeight: baseLineHeight }] = | |
defaultTheme.fontSize.base | |
const { spacing, borderWidth, borderRadius } = defaultTheme |
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
Widget listItemContainer(String title, String value) => Container( | |
margin: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), | |
padding: EdgeInsets.symmetric(vertical: 10.0), | |
width: double.infinity, | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
SizedBox(height: 5), | |
Text( | |
title, |
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
showPowerBottomSheet(BuildContext context) => showModalBottomSheet( | |
isScrollControlled: true, | |
context: context, | |
builder: (context) { | |
return Container( | |
height: 600, | |
color: Color(0xFF737373), | |
child: Container( | |
decoration: BoxDecoration( | |
color: Theme.of(context).canvasColor, |
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
Padding( | |
padding: const EdgeInsets.fromLTRB(50, 5, 50, 5), | |
child: SizedBox( | |
width: double.infinity, | |
child: blueButton( | |
"Copy Token", | |
() { | |
Clipboard.setData( | |
new ClipboardData(text: "4671-0884-7276-4345-8709")); | |
Flushbar( |
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
MaterialButton viewMoreButtons(String title, Function fun) { | |
return MaterialButton( | |
onPressed: fun, | |
textColor: Colors.white, | |
color: const Color(0xffFFAC38), | |
child: SizedBox( | |
width: double.infinity, | |
child: Text( | |
title, | |
textAlign: TextAlign.left, |
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
RaisedButton blueButton(String label, Function fun) { | |
return RaisedButton( | |
onPressed: fun, | |
textColor: Colors.white, | |
color: Color(0xfff063057), | |
padding: const EdgeInsets.all(15.0), | |
child: Text(label), | |
shape: RoundedRectangleBorder( | |
borderRadius: BorderRadius.circular(10.0), | |
), |
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
Center( | |
child: Stack( | |
children: <Widget>[ | |
Align( | |
alignment: Alignment.center, | |
child: Container( | |
margin: const EdgeInsets.all(7.0), | |
padding: const EdgeInsets.all(30.0), | |
decoration: BoxDecoration( | |
border: Border.all( |
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
SizedBox(height: 70), | |
Center( | |
child: Image.asset( | |
'assets/images/success-bulb/success-bulb.png', | |
width: size.width * .30, | |
fit: BoxFit.fill, | |
), | |
), | |
Center( |
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
class SuccesfulPurchase extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
Size size = MediaQuery.of(context).size; | |
return SafeArea( | |
child: Scaffold( | |
body: Column( | |
children: <Widget>[], | |
), | |
), |
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:flutter/material.dart'; | |
import 'package:flushbar/flushbar.dart'; | |
import 'package:flutter/services.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
NewerOlder