-
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.
Changelist: - Add initial slider value feature - Add Averta font - Add 'Done' and keyboard buttons
- Loading branch information
Showing
8 changed files
with
160 additions
and
16 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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,62 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class DigitsKeyboardButton extends StatelessWidget { | ||
const DigitsKeyboardButton({ | ||
Key? key, | ||
required this.onPressed, | ||
}) : super(key: key); | ||
|
||
final VoidCallback onPressed; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return OutlinedButton( | ||
onPressed: onPressed, | ||
style: ButtonStyle( | ||
backgroundColor: MaterialStateProperty.all<Color>( | ||
const Color(0xFF856EE1), | ||
), | ||
padding: MaterialStateProperty.all<EdgeInsets>( | ||
EdgeInsets.all(23), | ||
), | ||
shape: MaterialStateProperty.all<OutlinedBorder>( | ||
RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
side: BorderSide(width: 2, color: const Color(0xFF9A88E6)) | ||
), | ||
), | ||
), | ||
child: GridView.builder( | ||
shrinkWrap: true, | ||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( | ||
crossAxisCount: 3, | ||
crossAxisSpacing: 4.5, | ||
mainAxisSpacing: 4.5, | ||
mainAxisExtent: 5, | ||
childAspectRatio: 1 | ||
), | ||
itemCount: 9, | ||
itemBuilder: (context, index) { | ||
if (index == 6 || index == 8) { | ||
return Container( | ||
width: 5, | ||
height: 5, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(2), | ||
color: const Color(0x4DFFFFFF), | ||
), | ||
); | ||
} | ||
return Container( | ||
width: 5, | ||
height: 5, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(2), | ||
color: Colors.white, | ||
), | ||
); | ||
}, | ||
), | ||
); | ||
} | ||
} |
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,39 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class DoneButton extends StatelessWidget { | ||
const DoneButton({Key? key, required this.onPressed}) : super(key: key); | ||
|
||
final VoidCallback onPressed; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
width: double.maxFinite, | ||
child: OutlinedButton( | ||
onPressed: onPressed, | ||
style: ButtonStyle( | ||
backgroundColor: MaterialStateProperty.all<Color>(Colors.white), | ||
foregroundColor: MaterialStateProperty.all<Color>( | ||
const Color(0xFF856EE1), | ||
), | ||
padding: MaterialStateProperty.all<EdgeInsets>( | ||
EdgeInsets.all(27), | ||
), | ||
shape: MaterialStateProperty.all<OutlinedBorder>( | ||
RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
), | ||
), | ||
child: Text( | ||
'Done', | ||
style: const TextStyle( | ||
fontFamily: 'Averta', | ||
fontSize: 16, | ||
fontWeight: FontWeight.w600, | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
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