diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..dd84ea78 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..b09e1144 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at info@ionicfirebaseapp.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..a4e22705 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,92 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. + +## Code of Conduct + +### Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +### Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +### Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at [INSERT EMAIL ADDRESS]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/demo_app/lib/assets/icons/avatar.png b/demo_app/lib/assets/icons/avatar.png new file mode 100644 index 00000000..685ad1a3 Binary files /dev/null and b/demo_app/lib/assets/icons/avatar.png differ diff --git a/demo_app/lib/assets/icons/back.png b/demo_app/lib/assets/icons/back.png new file mode 100644 index 00000000..6c90e89b Binary files /dev/null and b/demo_app/lib/assets/icons/back.png differ diff --git a/demo_app/lib/assets/icons/badge.png b/demo_app/lib/assets/icons/badge.png new file mode 100644 index 00000000..5d233517 Binary files /dev/null and b/demo_app/lib/assets/icons/badge.png differ diff --git a/demo_app/lib/assets/icons/buttons.png b/demo_app/lib/assets/icons/buttons.png new file mode 100644 index 00000000..d7cf8870 Binary files /dev/null and b/demo_app/lib/assets/icons/buttons.png differ diff --git a/demo_app/lib/assets/icons/buttons.svg b/demo_app/lib/assets/icons/buttons.svg new file mode 100644 index 00000000..415c67d3 --- /dev/null +++ b/demo_app/lib/assets/icons/buttons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/demo_app/lib/assets/icons/card.png b/demo_app/lib/assets/icons/card.png new file mode 100644 index 00000000..79543ea6 Binary files /dev/null and b/demo_app/lib/assets/icons/card.png differ diff --git a/demo_app/lib/assets/icons/chips.png b/demo_app/lib/assets/icons/chips.png new file mode 100644 index 00000000..99b08372 Binary files /dev/null and b/demo_app/lib/assets/icons/chips.png differ diff --git a/demo_app/lib/assets/icons/danger.svg b/demo_app/lib/assets/icons/danger.svg new file mode 100644 index 00000000..dea91e14 --- /dev/null +++ b/demo_app/lib/assets/icons/danger.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/demo_app/lib/assets/icons/dark.svg b/demo_app/lib/assets/icons/dark.svg new file mode 100644 index 00000000..a5e5eb1b --- /dev/null +++ b/demo_app/lib/assets/icons/dark.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/demo_app/lib/assets/icons/dribble.svg b/demo_app/lib/assets/icons/dribble.svg new file mode 100644 index 00000000..dbaca3b1 --- /dev/null +++ b/demo_app/lib/assets/icons/dribble.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/demo_app/lib/assets/icons/fb.svg b/demo_app/lib/assets/icons/fb.svg new file mode 100644 index 00000000..e6078c98 --- /dev/null +++ b/demo_app/lib/assets/icons/fb.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/demo_app/lib/assets/icons/google.svg b/demo_app/lib/assets/icons/google.svg new file mode 100644 index 00000000..d837859e --- /dev/null +++ b/demo_app/lib/assets/icons/google.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/demo_app/lib/assets/icons/images.png b/demo_app/lib/assets/icons/images.png new file mode 100644 index 00000000..b5e4cb02 Binary files /dev/null and b/demo_app/lib/assets/icons/images.png differ diff --git a/demo_app/lib/assets/icons/info.svg b/demo_app/lib/assets/icons/info.svg new file mode 100644 index 00000000..21fd193c --- /dev/null +++ b/demo_app/lib/assets/icons/info.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/demo_app/lib/assets/icons/items.png b/demo_app/lib/assets/icons/items.png new file mode 100644 index 00000000..1a495321 Binary files /dev/null and b/demo_app/lib/assets/icons/items.png differ diff --git a/demo_app/lib/assets/icons/light.svg b/demo_app/lib/assets/icons/light.svg new file mode 100644 index 00000000..bf6f73a6 --- /dev/null +++ b/demo_app/lib/assets/icons/light.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/demo_app/lib/assets/icons/link.svg b/demo_app/lib/assets/icons/link.svg new file mode 100644 index 00000000..9260d523 --- /dev/null +++ b/demo_app/lib/assets/icons/link.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/demo_app/lib/assets/icons/linkedin.svg b/demo_app/lib/assets/icons/linkedin.svg new file mode 100644 index 00000000..7adb1746 --- /dev/null +++ b/demo_app/lib/assets/icons/linkedin.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/demo_app/lib/assets/icons/lists.png b/demo_app/lib/assets/icons/lists.png new file mode 100644 index 00000000..e3e93174 Binary files /dev/null and b/demo_app/lib/assets/icons/lists.png differ diff --git a/demo_app/lib/assets/icons/menu.png b/demo_app/lib/assets/icons/menu.png new file mode 100644 index 00000000..0932d5f5 Binary files /dev/null and b/demo_app/lib/assets/icons/menu.png differ diff --git a/demo_app/lib/assets/icons/next.png b/demo_app/lib/assets/icons/next.png new file mode 100644 index 00000000..8d3c89d9 Binary files /dev/null and b/demo_app/lib/assets/icons/next.png differ diff --git a/demo_app/lib/assets/icons/pinterest.svg b/demo_app/lib/assets/icons/pinterest.svg new file mode 100644 index 00000000..7aa538e1 --- /dev/null +++ b/demo_app/lib/assets/icons/pinterest.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/demo_app/lib/assets/icons/primary.svg b/demo_app/lib/assets/icons/primary.svg new file mode 100644 index 00000000..c2ad37e4 --- /dev/null +++ b/demo_app/lib/assets/icons/primary.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/demo_app/lib/assets/icons/secondary.svg b/demo_app/lib/assets/icons/secondary.svg new file mode 100644 index 00000000..56c06ebe --- /dev/null +++ b/demo_app/lib/assets/icons/secondary.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/demo_app/lib/assets/icons/slack.svg b/demo_app/lib/assets/icons/slack.svg new file mode 100644 index 00000000..ed08c2a0 --- /dev/null +++ b/demo_app/lib/assets/icons/slack.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/demo_app/lib/assets/icons/slider.png b/demo_app/lib/assets/icons/slider.png new file mode 100644 index 00000000..03fb809b Binary files /dev/null and b/demo_app/lib/assets/icons/slider.png differ diff --git a/demo_app/lib/assets/icons/success.svg b/demo_app/lib/assets/icons/success.svg new file mode 100644 index 00000000..b06b4ae5 --- /dev/null +++ b/demo_app/lib/assets/icons/success.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/demo_app/lib/assets/icons/tabs.png b/demo_app/lib/assets/icons/tabs.png new file mode 100644 index 00000000..49678a20 Binary files /dev/null and b/demo_app/lib/assets/icons/tabs.png differ diff --git a/demo_app/lib/assets/icons/toast.png b/demo_app/lib/assets/icons/toast.png new file mode 100644 index 00000000..44ee2d77 Binary files /dev/null and b/demo_app/lib/assets/icons/toast.png differ diff --git a/demo_app/lib/assets/icons/toggle.png b/demo_app/lib/assets/icons/toggle.png new file mode 100644 index 00000000..f33816f9 Binary files /dev/null and b/demo_app/lib/assets/icons/toggle.png differ diff --git a/demo_app/lib/assets/icons/twitter.svg b/demo_app/lib/assets/icons/twitter.svg new file mode 100644 index 00000000..ac962749 --- /dev/null +++ b/demo_app/lib/assets/icons/twitter.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/demo_app/lib/assets/icons/typo.png b/demo_app/lib/assets/icons/typo.png new file mode 100644 index 00000000..90592362 Binary files /dev/null and b/demo_app/lib/assets/icons/typo.png differ diff --git a/demo_app/lib/assets/icons/warning.svg b/demo_app/lib/assets/icons/warning.svg new file mode 100644 index 00000000..aae2b731 --- /dev/null +++ b/demo_app/lib/assets/icons/warning.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/demo_app/lib/assets/icons/whatsapp.svg b/demo_app/lib/assets/icons/whatsapp.svg new file mode 100644 index 00000000..992ff345 --- /dev/null +++ b/demo_app/lib/assets/icons/whatsapp.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/demo_app/lib/assets/icons/youtube.svg b/demo_app/lib/assets/icons/youtube.svg new file mode 100644 index 00000000..b2503883 --- /dev/null +++ b/demo_app/lib/assets/icons/youtube.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/demo_app/lib/assets/logo/logo.png b/demo_app/lib/assets/logo/logo.png new file mode 100644 index 00000000..27e5cae0 Binary files /dev/null and b/demo_app/lib/assets/logo/logo.png differ diff --git a/demo_app/lib/screens/avatars.dart b/demo_app/lib/screens/avatars.dart index 6b9ac2ad..fecf6873 100644 --- a/demo_app/lib/screens/avatars.dart +++ b/demo_app/lib/screens/avatars.dart @@ -2,9 +2,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:ui_kit/components/avatar/gf_avatar.dart'; import 'package:ui_kit/components/card/gf_card.dart'; -import 'package:ui_kit/components/header/gf_header.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; import 'package:ui_kit/shape/gf_avatar_shape.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; import 'package:ui_kit/colors/gf_color.dart'; class Avatars extends StatefulWidget { @@ -27,9 +27,9 @@ class _AvatarsState extends State { content: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFHeader( + GFTypography( text: 'Circle Avatar', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -109,9 +109,9 @@ class _AvatarsState extends State { content: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFHeader( + GFTypography( text: 'Square Avatar', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -200,9 +200,9 @@ class _AvatarsState extends State { content: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFHeader( + GFTypography( text: 'Standard Avatar', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, diff --git a/demo_app/lib/screens/badges.dart b/demo_app/lib/screens/badges.dart index c355f07b..5beb7ca3 100644 --- a/demo_app/lib/screens/badges.dart +++ b/demo_app/lib/screens/badges.dart @@ -4,14 +4,15 @@ import 'package:ui_kit/components/badge/gf_badge.dart'; import 'package:ui_kit/components/badge/gf_button_badge.dart'; import 'package:ui_kit/components/badge/gf_icon_badge.dart'; import 'package:ui_kit/components/card/gf_card.dart'; -import 'package:ui_kit/components/header/gf_header.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; import 'package:ui_kit/components/tabs/gf_tabs.dart'; import 'package:ui_kit/components/button/gf_icon_button.dart'; import 'package:ui_kit/position/gf_position.dart'; import 'package:ui_kit/shape/gf_badge_shape.dart'; import 'package:ui_kit/shape/gf_button_shape.dart'; +import 'package:ui_kit/shape/gf_icon_button_shape.dart'; import 'package:ui_kit/size/gf_size.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; import 'package:ui_kit/types/gf_type.dart'; import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; @@ -51,9 +52,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Types of Badges', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -90,9 +91,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Circled Badges with different Sizes', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -126,9 +127,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Squared Badges with different sizes', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -162,9 +163,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Pills with different sizes', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -201,9 +202,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Standard Badges with different sizes', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -241,9 +242,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Types of Button Badges', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -255,7 +256,7 @@ class _BadgesState extends State { shape: GFButtonShape.pills, type: GFType.solid, color: GFColor.info, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.warning, shape: GFBadgeShape.circle, @@ -268,7 +269,7 @@ class _BadgesState extends State { shape: GFButtonShape.square, type: GFType.solid, color: GFColor.warning, - counterChild: GFBadge( + icon: GFBadge( text: '12', shape: GFBadgeShape.circle, color: GFColor.info, @@ -280,7 +281,7 @@ class _BadgesState extends State { color: GFColor.success, shape: GFButtonShape.standard, type: GFType.solid, - counterChild: GFBadge( + icon: GFBadge( text: '12', textColor: GFColor.white, color: GFColor.danger, @@ -297,9 +298,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Positions of Button Badges', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -311,7 +312,7 @@ class _BadgesState extends State { shape: GFButtonShape.pills, type: GFType.solid, color: GFColor.info, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.warning, shape: GFBadgeShape.circle, @@ -324,7 +325,7 @@ class _BadgesState extends State { shape: GFButtonShape.square, type: GFType.solid, color: GFColor.warning, - counterChild: GFBadge( + icon: GFBadge( text: '12', shape: GFBadgeShape.circle, color: GFColor.info, @@ -337,7 +338,7 @@ class _BadgesState extends State { color: GFColor.success, shape: GFButtonShape.standard, type: GFType.solid, - counterChild: GFBadge( + icon: GFBadge( text: '12', textColor: GFColor.white, color: GFColor.danger, @@ -355,9 +356,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Pilled shape Button Badges with sizes', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -370,7 +371,7 @@ class _BadgesState extends State { size: GFSize.large, type: GFType.solid, color: GFColor.info, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.warning, size: GFSize.large, @@ -385,7 +386,7 @@ class _BadgesState extends State { size: GFSize.medium, type: GFType.outline, color: GFColor.info, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.warning, size: GFSize.medium, @@ -400,7 +401,7 @@ class _BadgesState extends State { size: GFSize.small, type: GFType.transparent, color: GFColor.info, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.warning, size: GFSize.small, @@ -418,9 +419,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Squared shape Button Badges with sizes', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -433,7 +434,7 @@ class _BadgesState extends State { size: GFSize.large, type: GFType.solid, color: GFColor.warning, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.info, size: GFSize.large, @@ -448,7 +449,7 @@ class _BadgesState extends State { size: GFSize.medium, type: GFType.outline, color: GFColor.warning, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.info, size: GFSize.medium, @@ -463,7 +464,7 @@ class _BadgesState extends State { size: GFSize.small, type: GFType.transparent, color: GFColor.warning, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.info, size: GFSize.small, @@ -481,9 +482,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Standard Button Badges with sizes', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -496,7 +497,7 @@ class _BadgesState extends State { size: GFSize.large, type: GFType.solid, color: GFColor.primary, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.danger, size: GFSize.large, @@ -512,7 +513,7 @@ class _BadgesState extends State { size: GFSize.medium, type: GFType.outline, color: GFColor.primary, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.danger, textColor: GFColor.white, @@ -528,7 +529,7 @@ class _BadgesState extends State { size: GFSize.small, type: GFType.transparent, color: GFColor.primary, - counterChild: GFBadge( + icon: GFBadge( text: '12', color: GFColor.danger, textColor: GFColor.white, @@ -551,9 +552,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Types of Icon Badges', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -562,9 +563,8 @@ class _BadgesState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFIconBadge( - onPressed: null, child: GFIconButton( - shape: GFButtonShape.pills, + shape: GFIconButtonShape.pills, color: GFColor.success, type: GFType.solid, onPressed: null, @@ -576,9 +576,8 @@ class _BadgesState extends State { size: GFSize.small, )), GFIconBadge( - onPressed: null, child: GFIconButton( - shape: GFButtonShape.square, + shape: GFIconButtonShape.square, color: GFColor.primary, type: GFType.solid, onPressed: null, @@ -590,9 +589,8 @@ class _BadgesState extends State { size: GFSize.small, )), GFIconBadge( - onPressed: null, child: GFIconButton( - shape: GFButtonShape.pills, + shape: GFIconButtonShape.pills, color: GFColor.danger, type: GFType.solid, onPressed: null, @@ -604,9 +602,8 @@ class _BadgesState extends State { size: GFSize.small, )), GFIconBadge( - onPressed: null, child: GFIconButton( - shape: GFButtonShape.standard, + shape: GFIconButtonShape.standard, type: GFType.solid, color: GFColor.warning, onPressed: null, @@ -625,9 +622,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Shapes of Icon Badges', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -636,9 +633,8 @@ class _BadgesState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFIconBadge( - onPressed: null, child: GFIconButton( - shape: GFButtonShape.pills, + shape: GFIconButtonShape.pills, onPressed: null, icon: Icon(Icons.mail), ), @@ -648,9 +644,8 @@ class _BadgesState extends State { size: GFSize.small, )), GFIconBadge( - onPressed: null, child: GFIconButton( - shape: GFButtonShape.square, + shape: GFIconButtonShape.square, onPressed: null, icon: Icon(Icons.mail), ), @@ -661,9 +656,8 @@ class _BadgesState extends State { size: GFSize.small, )), GFIconBadge( - onPressed: null, child: GFIconButton( - shape: GFButtonShape.pills, + shape: GFIconButtonShape.pills, onPressed: null, icon: Icon(Icons.mail), ), @@ -673,9 +667,8 @@ class _BadgesState extends State { size: GFSize.small, )), GFIconBadge( - onPressed: null, child: GFIconButton( - shape: GFButtonShape.standard, + shape: GFIconButtonShape.standard, onPressed: null, icon: Icon(Icons.mail), ), @@ -693,9 +686,9 @@ class _BadgesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Sizes of Icon Badges', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -704,7 +697,6 @@ class _BadgesState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFIconBadge( - onPressed: null, child: GFIconButton( size: GFSize.large, onPressed: null, @@ -716,7 +708,6 @@ class _BadgesState extends State { size: GFSize.small, )), GFIconBadge( - onPressed: null, child: GFIconButton( size: GFSize.medium, onPressed: null, @@ -728,7 +719,6 @@ class _BadgesState extends State { size: GFSize.small, )), GFIconBadge( - onPressed: null, child: GFIconButton( size: GFSize.small, onPressed: null, diff --git a/demo_app/lib/screens/badges/badges.dart b/demo_app/lib/screens/badges/badges.dart new file mode 100644 index 00000000..34ff7a15 --- /dev/null +++ b/demo_app/lib/screens/badges/badges.dart @@ -0,0 +1,295 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:ui_kit/colors/gf_color.dart'; +import 'package:ui_kit/components/badge/gf_badge.dart'; +import 'package:ui_kit/components/badge/gf_button_badge.dart'; +import 'package:ui_kit/components/badge/gf_icon_badge.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; +import 'package:ui_kit/components/tabs/gf_tabs.dart'; +import 'package:ui_kit/components/button/gf_icon_button.dart'; +import 'package:ui_kit/position/gf_position.dart'; +import 'package:ui_kit/shape/gf_badge_shape.dart'; +import 'package:ui_kit/shape/gf_button_shape.dart'; +import 'package:ui_kit/size/gf_size.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; +import 'package:ui_kit/types/gf_type.dart'; +import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; + +class Badges extends StatefulWidget { + @override + _BadgesState createState() => _BadgesState(); +} + +class _BadgesState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: getGFColor(GFColor.dark), + title: Text( + 'Badges', + style: TextStyle(fontSize: 17), + ), + centerTitle: true, + ), + body: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'With Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButtonBadge( + icon: GFBadge( + text: '6', + shape: GFBadgeShape.pills, + ), + onPressed: () {}, + text: 'Primary', + ), + GFButtonBadge( + icon: GFBadge( + text: '6', + shape: GFBadgeShape.pills, + ), + onPressed: () {}, + text: 'Second', + color: GFColor.secondary, + ), + GFButtonBadge( + icon: GFBadge( + text: '6', + shape: GFBadgeShape.pills, + ), + onPressed: () {}, + text: 'Success', + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButtonBadge( + icon: GFBadge( + text: '6', + shape: GFBadgeShape.pills, + ), + onPressed: () {}, + text: 'Warning', + color: GFColor.warning, + ), + GFButtonBadge( + icon: GFBadge( + text: '6', + shape: GFBadgeShape.pills, + ), + onPressed: () {}, + text: 'Danger', + color: GFColor.danger, + ), + GFButtonBadge( + icon: GFBadge( + text: '6', + shape: GFBadgeShape.pills, + ), + onPressed: () {}, + text: 'Info', + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButtonBadge( + icon: GFBadge( + text: '6', + shape: GFBadgeShape.pills, + ), + onPressed: () {}, + text: 'Light', + color: GFColor.light, + ), + GFButtonBadge( + icon: GFBadge( + text: '6', + shape: GFBadgeShape.pills, + ), + onPressed: () {}, + text: 'Dark', + textStyle: TextStyle(color: getGFColor(GFColor.white)), + color: GFColor.dark, + ), + GFButtonBadge( + icon: GFBadge( + text: '6', + shape: GFBadgeShape.pills, + ), + onPressed: () {}, + text: 'Link', + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'Icon with Badges', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + children: [ + SizedBox( + height: 20, + ), + Row( + children: [ + GFIconBadge( + child: GFIconButton( + type: GFType.transparent, + onPressed: () {}, + icon: SvgPicture.asset( + 'lib/assets/icons/primary.svg', + color: getGFColor(GFColor.primary), + )), + counterChild: GFBadge( + text: '12', + shape: GFBadgeShape.circle, + size: GFSize.small, + )), + GFIconBadge( + child: GFIconButton( + type: GFType.transparent, + onPressed: () {}, + icon: SvgPicture.asset( + 'lib/assets/icons/secondary.svg', + color: getGFColor(GFColor.secondary), + )), + counterChild: GFBadge( + text: '12', + shape: GFBadgeShape.circle, + size: GFSize.small, + )), + GFIconBadge( + child: GFIconButton( + type: GFType.transparent, + onPressed: () {}, + icon: SvgPicture.asset( + 'lib/assets/icons/success.svg', + color: getGFColor(GFColor.success), + )), + counterChild: GFBadge( + text: '12', + shape: GFBadgeShape.circle, + size: GFSize.small, + )), + GFIconBadge( + child: GFIconButton( + type: GFType.transparent, + onPressed: () {}, + icon: SvgPicture.asset( + 'lib/assets/icons/warning.svg', + color: getGFColor(GFColor.warning), + )), + counterChild: GFBadge( + text: '12', + shape: GFBadgeShape.circle, + size: GFSize.small, + )), + GFIconBadge( + child: GFIconButton( + type: GFType.transparent, + onPressed: () {}, + icon: SvgPicture.asset( + 'lib/assets/icons/danger.svg', + color: getGFColor(GFColor.danger), + )), + counterChild: GFBadge( + text: '12', + shape: GFBadgeShape.circle, + size: GFSize.small, + )), + ], + ), + Row( + children: [ + GFIconBadge( + child: GFIconButton( + type: GFType.transparent, + onPressed: () {}, + icon: SvgPicture.asset( + 'lib/assets/icons/info.svg', + color: getGFColor(GFColor.info), + )), + counterChild: GFBadge( + text: '12', + shape: GFBadgeShape.standard, + size: GFSize.small, + )), + GFIconBadge( + child: GFIconButton( + type: GFType.transparent, + onPressed: () {}, + icon: SvgPicture.asset( + 'lib/assets/icons/light.svg', + color: getGFColor(GFColor.light), + )), + counterChild: GFBadge( + text: '12', + shape: GFBadgeShape.square, + size: GFSize.small, + )), + GFIconBadge( + child: GFIconButton( + type: GFType.transparent, + onPressed: () {}, + icon: SvgPicture.asset( + 'lib/assets/icons/dark.svg', + color: getGFColor(GFColor.dark), + )), + counterChild: GFBadge( + text: '12', + shape: GFBadgeShape.pills, + size: GFSize.small, + )), + ], + ) + ], + ), + ), + ], + ), + ); + } +} diff --git a/demo_app/lib/screens/button/button-types.dart b/demo_app/lib/screens/button/button-types.dart new file mode 100644 index 00000000..a9ffb0bb --- /dev/null +++ b/demo_app/lib/screens/button/button-types.dart @@ -0,0 +1,237 @@ +import 'package:demo_app/screens/avatars.dart'; +import 'package:demo_app/screens/button/shadow-buttons.dart'; +import 'package:ui_kit/components/avatar/gf_avatar.dart'; + +import 'standard-buttons.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:ui_kit/colors/gf_color.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/components/list_tile/gf_list_tile.dart'; +import 'pill-buttons.dart'; +import 'square-buttons.dart'; +import 'icon-buttons.dart'; +import 'social-buttons.dart'; + +class ButtonTypes extends StatefulWidget { + @override + _ButtonTypesState createState() => _ButtonTypesState(); +} + +class _ButtonTypesState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: getGFColor(GFColor.dark), + leading: GestureDetector( + onTap: (){ + Navigator.pop(context); + }, + child:Image.asset('lib/assets/icons/back.png') + ), + title: Text('Buttons', style: TextStyle(fontSize: 17),), + centerTitle: true, + ), + + body: ListView( + children: [ + SizedBox( + height: 20, + ), + GestureDetector( + onTap: (){ + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => StandardButtons() + ), + ); + }, + child:Container( + margin: EdgeInsets.only(left: 15, right: 15, top: 20), + padding: EdgeInsets.all(5), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(7)), + color: getGFColor(GFColor.dark), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.40), + blurRadius: 5.0 + ) + ] + ), + child: GFListTile( + color: getGFColor(GFColor.dark), + showDivider: false, + title: Text('Standard Buttons', style: TextStyle(color: getGFColor(GFColor.white)),), + icon: Image.asset('lib/assets/icons/next.png'), + + ), + ) + ), + + GestureDetector( + onTap: (){ + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => PillsButtons() + ), + ); + }, + child:Container( + margin: EdgeInsets.only(left: 15, right: 15, top: 20), + padding: EdgeInsets.all(5), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(7)), + color: getGFColor(GFColor.dark), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.40), + blurRadius: 5.0 + ) + ] + ), + child: GFListTile( + color: getGFColor(GFColor.dark), + showDivider: false, + title: Text('Pills Buttons', style: TextStyle(color: getGFColor(GFColor.white)),), + icon: Image.asset('lib/assets/icons/next.png') + ), + ) + ), + + + GestureDetector( + onTap: (){ + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => SquareButtons() + ), + ); + }, + child:Container( + margin: EdgeInsets.only(left: 15, right: 15, top: 20), + padding: EdgeInsets.all(5), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(7)), + color: getGFColor(GFColor.dark), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.40), + blurRadius: 5.0 + ) + ] + ), + child: GFListTile( + color: getGFColor(GFColor.dark), + showDivider: false, + title: Text('Square Buttons', style: TextStyle(color: getGFColor(GFColor.white)),), + icon: Image.asset('lib/assets/icons/next.png') + ), + ) + ), + + GestureDetector( + onTap: (){ + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => ShadowButtons() + ), + ); + }, + child:Container( + margin: EdgeInsets.only(left: 15, right: 15, top: 20), + padding: EdgeInsets.all(5), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(7)), + color: getGFColor(GFColor.dark), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.40), + blurRadius: 5.0 + ) + ] + ), + child: GFListTile( + color: getGFColor(GFColor.dark), + showDivider: false, + title: Text('Shadow Buttons', style: TextStyle(color: getGFColor(GFColor.white)),), + icon: Image.asset('lib/assets/icons/next.png') + ), + ) + ), + + GestureDetector( + onTap: (){ + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => IconButtons() + ), + ); + }, + child:Container( + margin: EdgeInsets.only(left: 15, right: 15, top: 20), + padding: EdgeInsets.all(5), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(7)), + color: getGFColor(GFColor.dark), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.40), + blurRadius: 5.0 + ) + ] + ), + child: GFListTile( + color: getGFColor(GFColor.dark), + showDivider: false, + title: Text('Icons Buttons', style: TextStyle(color: getGFColor(GFColor.white)),), + icon: Image.asset('lib/assets/icons/next.png') + ), + ) + ), + + GestureDetector( + onTap: (){ + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => SocialButtons() + ), + ); + }, + child:Container( + + margin: EdgeInsets.only(left: 15, right: 15, top: 20, bottom: 20), + padding: EdgeInsets.all(5), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(7)), + color: getGFColor(GFColor.dark), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.40), + blurRadius: 5.0 + ) + ] + ), + child: GFListTile( + color: getGFColor(GFColor.dark), + showDivider: false, + title: Text('Social Buttons', style: TextStyle(color: getGFColor(GFColor.white)),), + icon: Image.asset('lib/assets/icons/next.png') + ), + ) + ), + + + ], + ) + + ); + } +} diff --git a/demo_app/lib/screens/button/icon-buttons.dart b/demo_app/lib/screens/button/icon-buttons.dart new file mode 100644 index 00000000..80309f0b --- /dev/null +++ b/demo_app/lib/screens/button/icon-buttons.dart @@ -0,0 +1,1185 @@ +import 'package:flutter/material.dart'; +import 'package:ui_kit/colors/gf_color.dart'; +import 'package:ui_kit/components/button/gf_button.dart'; +import 'package:ui_kit/components/button/gf_icon_button.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; +import 'package:ui_kit/shape/gf_button_shape.dart'; +import 'package:ui_kit/types/gf_type.dart'; +import 'package:ui_kit/size/gf_size.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class IconButtons extends StatefulWidget { + @override + _IconButtonsState createState() => _IconButtonsState(); +} + +class _IconButtonsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: getGFColor(GFColor.dark), + leading: GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Image.asset('lib/assets/icons/back.png')), + title: Text( + 'Icon Buttons', + style: TextStyle(fontSize: 17), + ), + centerTitle: true, + ), + body: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Solid Icons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), +// +// GFCard( +// content: Column( +// children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +//// GFIconButton( +//// onPressed: (){}, +//// icon: Icon(Icons.ac_unit), +////// iconSize: 12.0, +//// type: GFType.solid, +//// shape: GFButtonShape.pills, +//// size: GFSize.large, +////// buttonBoxShadow: true, +////// color: GFColor.primary, +////// boxShadow: BoxShadow( +////// color: Colors.pink, +////// blurRadius: 2.0, +////// spreadRadius: 1.0, +////// offset: Offset.zero, +////// ), +////// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +////// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +//// ), +// +// +// ], +// ), +// ], +// ) +// ) + + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GFButton( + onPressed: () {}, + child: Text( + "Primary", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/primary.svg')), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text("Second"), + icon: SvgPicture.asset( + 'lib/assets/icons/secondary.svg'), + color: GFColor.secondary, + ), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + icon: + SvgPicture.asset('lib/assets/icons/success.svg'), + color: GFColor.success, + ), + ) + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + icon: SvgPicture.asset('lib/assets/icons/warning.svg'), + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + icon: SvgPicture.asset('lib/assets/icons/danger.svg'), + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + icon: SvgPicture.asset('lib/assets/icons/info.svg'), + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + icon: SvgPicture.asset('lib/assets/icons/light.svg'), + type: GFType.solid, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + style: TextStyle(color: getGFColor(GFColor.white)), + ), + icon: SvgPicture.asset('lib/assets/icons/dark.svg'), + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + icon: SvgPicture.asset('lib/assets/icons/link.svg'), + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Outline Icons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GFButton( + onPressed: () {}, + type: GFType.outline, + child: Text( + "Primary", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/primary.svg', + color: getGFColor(GFColor.primary), + )), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text("Second"), + icon: SvgPicture.asset( + 'lib/assets/icons/secondary.svg', + color: getGFColor(GFColor.secondary), + ), + color: GFColor.secondary, + type: GFType.outline, + ), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/success.svg', + color: getGFColor(GFColor.success), + ), + color: GFColor.success, + type: GFType.outline, + ), + ) + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/warning.svg', + color: getGFColor(GFColor.warning), + ), + color: GFColor.warning, + type: GFType.outline, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/danger.svg', + color: getGFColor(GFColor.danger), + ), + color: GFColor.danger, + type: GFType.outline, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/info.svg', + color: getGFColor(GFColor.info), + ), + color: GFColor.info, + type: GFType.outline, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/light.svg', + color: getGFColor(GFColor.light), + ), + type: GFType.outline, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/dark.svg', + color: getGFColor(GFColor.dark), + ), + color: GFColor.dark, + type: GFType.outline, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/link.svg', + color: getGFColor(GFColor.alt), + ), + color: GFColor.transparent, + type: GFType.outline, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Outline 2x Icons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GFButton( + onPressed: () {}, + type: GFType.outline2x, + child: Text( + "Primary", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/primary.svg', + color: getGFColor(GFColor.primary), + )), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text("Second"), + icon: SvgPicture.asset( + 'lib/assets/icons/secondary.svg', + color: getGFColor(GFColor.secondary), + ), + color: GFColor.secondary, + type: GFType.outline2x, + ), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/success.svg', + color: getGFColor(GFColor.success), + ), + color: GFColor.success, + type: GFType.outline2x, + ), + ) + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/warning.svg', + color: getGFColor(GFColor.warning), + ), + color: GFColor.warning, + type: GFType.outline2x, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/danger.svg', + color: getGFColor(GFColor.danger), + ), + color: GFColor.danger, + type: GFType.outline2x, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/info.svg', + color: getGFColor(GFColor.info), + ), + color: GFColor.info, + type: GFType.outline2x, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/light.svg', + color: getGFColor(GFColor.light), + ), + type: GFType.outline2x, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/dark.svg', + color: getGFColor(GFColor.dark), + ), + color: GFColor.dark, + type: GFType.outline2x, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/link.svg', + color: getGFColor(GFColor.alt), + ), + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Square Icons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GFButton( + onPressed: () {}, + shape: GFButtonShape.square, + child: Text( + "Primary", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/primary.svg')), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + shape: GFButtonShape.square, + child: Text("Second"), + icon: SvgPicture.asset( + 'lib/assets/icons/secondary.svg'), + color: GFColor.secondary, + ), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + shape: GFButtonShape.square, + onPressed: () {}, + child: Text( + "Success", + ), + icon: + SvgPicture.asset('lib/assets/icons/success.svg'), + color: GFColor.success, + ), + ) + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + shape: GFButtonShape.square, + child: Text( + "Warning", + ), + icon: SvgPicture.asset('lib/assets/icons/warning.svg'), + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + shape: GFButtonShape.square, + child: Text( + "Danger", + ), + icon: SvgPicture.asset('lib/assets/icons/danger.svg'), + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + shape: GFButtonShape.square, + child: Text( + "Info", + ), + icon: SvgPicture.asset('lib/assets/icons/info.svg'), + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + shape: GFButtonShape.square, + child: Text( + "Light", + ), + icon: SvgPicture.asset('lib/assets/icons/light.svg'), + type: GFType.solid, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + shape: GFButtonShape.square, + child: Text( + "Dark", + style: TextStyle(color: getGFColor(GFColor.white)), + ), + icon: SvgPicture.asset('lib/assets/icons/dark.svg'), + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + shape: GFButtonShape.square, + child: Text( + "Link", + ), + icon: SvgPicture.asset('lib/assets/icons/link.svg'), + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Pills Icons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Primary", + ), + icon: SvgPicture.asset( + 'lib/assets/icons/primary.svg')), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text("Second"), + icon: SvgPicture.asset( + 'lib/assets/icons/secondary.svg'), + color: GFColor.secondary, + ), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + shape: GFButtonShape.pills, + onPressed: () {}, + child: Text( + "Success", + ), + icon: + SvgPicture.asset('lib/assets/icons/success.svg'), + color: GFColor.success, + ), + ) + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Warning", + ), + icon: SvgPicture.asset('lib/assets/icons/warning.svg'), + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Danger", + ), + icon: SvgPicture.asset('lib/assets/icons/danger.svg'), + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Info", + ), + icon: SvgPicture.asset('lib/assets/icons/info.svg'), + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Light", + ), + icon: SvgPicture.asset('lib/assets/icons/light.svg'), + type: GFType.solid, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Dark", + style: TextStyle(color: getGFColor(GFColor.white)), + ), + icon: SvgPicture.asset('lib/assets/icons/dark.svg'), + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Link", + ), + icon: SvgPicture.asset('lib/assets/icons/link.svg'), + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Shadow Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GFButton( + onPressed: () {}, + child: Text( + "Primary", + ), + icon: + SvgPicture.asset('lib/assets/icons/primary.svg'), + buttonBoxShadow: true, + ), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text("Second"), + icon: SvgPicture.asset( + 'lib/assets/icons/secondary.svg'), + color: GFColor.secondary, + buttonBoxShadow: true, + ), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + icon: + SvgPicture.asset('lib/assets/icons/success.svg'), + color: GFColor.success, + buttonBoxShadow: true, + ), + ) + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + icon: SvgPicture.asset('lib/assets/icons/warning.svg'), + color: GFColor.warning, + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + icon: SvgPicture.asset('lib/assets/icons/danger.svg'), + color: GFColor.danger, + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + icon: SvgPicture.asset('lib/assets/icons/info.svg'), + color: GFColor.info, + buttonBoxShadow: true, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + icon: SvgPicture.asset('lib/assets/icons/light.svg'), + type: GFType.solid, + color: GFColor.light, + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + style: TextStyle(color: getGFColor(GFColor.white)), + ), + icon: SvgPicture.asset('lib/assets/icons/dark.svg'), + color: GFColor.dark, + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + icon: SvgPicture.asset('lib/assets/icons/link.svg'), + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text("Large", + style: TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.large, + icon: SvgPicture.asset('lib/assets/icons/primary.svg'), + ), + GFButton( + onPressed: () {}, + child: Text("Normal", + style: TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.medium, + icon: + SvgPicture.asset('lib/assets/icons/secondary.svg'), + ), + GFButton( + onPressed: () {}, + child: Text("Small", + style: TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.small, + icon: SvgPicture.asset('lib/assets/icons/info.svg'), + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Large", + ), + size: GFSize.large, + icon: SvgPicture.asset('lib/assets/icons/primary.svg'), + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Normal", + ), + size: GFSize.medium, + icon: SvgPicture.asset('lib/assets/icons/secondary.svg'), + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Small", + ), + size: GFSize.small, + icon: SvgPicture.asset('lib/assets/icons/success.svg'), + ), + SizedBox( + height: 10, + ), + ], + ), + ), + + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'Icons Only', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFIconButton( + icon: + SvgPicture.asset('lib/assets/icons/primary.svg'), + onPressed: () {}), + GFIconButton( + color: GFColor.secondary, + icon: SvgPicture.asset( + 'lib/assets/icons/secondary.svg'), + onPressed: () {}), + GFIconButton( + color: GFColor.success, + icon: + SvgPicture.asset('lib/assets/icons/success.svg'), + onPressed: () {}), + GFIconButton( + color: GFColor.warning, + icon: + SvgPicture.asset('lib/assets/icons/warning.svg'), + onPressed: () {}), + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFIconButton( + color: GFColor.danger, + icon: SvgPicture.asset('lib/assets/icons/danger.svg'), + onPressed: () {}), + GFIconButton( + color: GFColor.info, + icon: SvgPicture.asset('lib/assets/icons/info.svg'), + onPressed: () {}), + GFIconButton( + color: GFColor.light, + icon: SvgPicture.asset('lib/assets/icons/light.svg'), + onPressed: () {}), + GFIconButton( + color: GFColor.dark, + icon: SvgPicture.asset('lib/assets/icons/dark.svg'), + onPressed: () {}), + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFIconButton( + type: GFType.outline, + icon: Icon(Icons.settings), + onPressed: () {}), + GFIconButton( + type: GFType.outline, + color: GFColor.secondary, + icon: Icon(Icons.send), + onPressed: () {}), + GFIconButton( + type: GFType.outline, + color: GFColor.success, + icon: Icon(Icons.file_download), + onPressed: () {}), + GFIconButton( + type: GFType.outline, + color: GFColor.warning, + icon: Icon(Icons.warning), + onPressed: () {}), + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFIconButton( + type: GFType.outline, + color: GFColor.danger, + icon: Icon(Icons.insert_drive_file), + onPressed: () {}), + GFIconButton( + type: GFType.outline, + color: GFColor.info, + icon: Icon(Icons.delete), + onPressed: () {}), + GFIconButton( + type: GFType.outline, + color: GFColor.light, + icon: Icon(Icons.info), + onPressed: () {}), + GFIconButton( + type: GFType.outline, + color: GFColor.dark, + icon: Icon(Icons.apps), + onPressed: () {}), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + )); + } +} diff --git a/demo_app/lib/screens/button/pill-buttons.dart b/demo_app/lib/screens/button/pill-buttons.dart new file mode 100644 index 00000000..b994ecba --- /dev/null +++ b/demo_app/lib/screens/button/pill-buttons.dart @@ -0,0 +1,1189 @@ +import 'package:flutter/material.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; +import 'package:ui_kit/components/tabs/gf_tabs.dart'; +import 'package:ui_kit/components/button/gf_button.dart'; +import 'package:ui_kit/size/gf_size.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; +import 'package:ui_kit/types/gf_type.dart'; +import 'package:ui_kit/shape/gf_button_shape.dart'; +import 'package:ui_kit/colors/gf_color.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; + +class PillsButtons extends StatefulWidget { + @override + _PillsButtonsState createState() => _PillsButtonsState(); +} + +class _PillsButtonsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: getGFColor(GFColor.dark), + leading: GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Image.asset('lib/assets/icons/back.png')), + title: Text( + 'Pills Buttons', + style: TextStyle(fontSize: 17), + ), + centerTitle: true, + ), + body: GFTabs( + height: MediaQuery.of(context).size.height, + tabBarColor: Color(0xFFD3E9ED), + initialIndex: 0, + length: 3, + indicatorColor: getGFColor(GFColor.info), + unselectedLabelColor: getGFColor(GFColor.danger), + labelColor: getGFColor(GFColor.warning), + tabs: [ + GFButton( + onPressed: null, + child: Text( + "Solid", + style: TextStyle(fontSize: 12), + ), + type: GFType.solid, + textColor: GFColor.white, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: null, + child: Text( + "Outline", + style: TextStyle(fontSize: 12), + ), + type: GFType.outline, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: null, + text: 'Outline 2x', + textStyle: TextStyle(fontSize: 12, color: getGFColor(GFColor.dark)), + type: GFType.outline2x, + shape: GFButtonShape.pills, + ), + ], + tabBarView: GFTabBarView( + children: [ + Container( +// color: Colors.red, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Primary", + ), + color: GFColor.primary, + ), + GFButton( + onPressed: () {}, + child: Text( + "Secondary", + ), + color: GFColor.secondary, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + shape: GFButtonShape.pills, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + shape: GFButtonShape.pills, + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + shape: GFButtonShape.pills, + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + shape: GFButtonShape.pills, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + shape: GFButtonShape.pills, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + ), + shape: GFButtonShape.pills, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + shape: GFButtonShape.pills, + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Disabled State', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + shape: GFButtonShape.pills, + child: Text( + "Primary", + ), + color: GFColor.primary, + ), + GFButton( + onPressed: null, + child: Text( + "Secondary", + ), + color: GFColor.secondary, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: null, + child: Text( + "Success", + ), + shape: GFButtonShape.pills, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Warning", + ), + shape: GFButtonShape.pills, + color: GFColor.warning, + ), + GFButton( + onPressed: null, + child: Text( + "Danger", + ), + shape: GFButtonShape.pills, + color: GFColor.danger, + ), + GFButton( + onPressed: null, + child: Text( + "Info", + ), + shape: GFButtonShape.pills, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Light", + ), + shape: GFButtonShape.pills, + color: GFColor.light, + ), + GFButton( + onPressed: null, + child: Text( + "Dark", + ), + shape: GFButtonShape.pills, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + shape: GFButtonShape.pills, + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text("Large", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.large, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: () {}, + child: Text("Normal", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.medium, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: () {}, + child: Text("Small", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.small, + shape: GFButtonShape.pills, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Large", + style: + TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.large, + shape: GFButtonShape.pills, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Normal", + style: + TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.medium, + shape: GFButtonShape.pills, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Small", + style: + TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.small, + shape: GFButtonShape.pills, + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + ), + ), + + //tab 2 + Container( +// color: Colors.red, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Primary", + ), + type: GFType.outline, + color: GFColor.primary, + ), + GFButton( + onPressed: () {}, + child: Text( + "Secondary", + ), + color: GFColor.secondary, + type: GFType.outline, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Disabled State', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + shape: GFButtonShape.pills, + child: Text( + "Primary", + ), + type: GFType.outline, + color: GFColor.primary, + ), + GFButton( + onPressed: null, + child: Text( + "Secondary", + ), + color: GFColor.secondary, + type: GFType.outline, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: null, + child: Text( + "Success", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Warning", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.warning, + ), + GFButton( + onPressed: null, + child: Text( + "Danger", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.danger, + ), + GFButton( + onPressed: null, + child: Text( + "Info", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Light", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.light, + ), + GFButton( + onPressed: null, + child: Text( + "Dark", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.outline, + shape: GFButtonShape.pills, + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: () {}, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: () {}, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline, + shape: GFButtonShape.pills, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline, + shape: GFButtonShape.pills, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline, + shape: GFButtonShape.pills, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline, + shape: GFButtonShape.pills, + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + ), + ), + + //tab 3 + Container( +// color: Colors.red, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + shape: GFButtonShape.pills, + child: Text( + "Primary", + ), + type: GFType.outline2x, + color: GFColor.primary, + ), + GFButton( + onPressed: () {}, + child: Text( + "Secondary", + ), + color: GFColor.secondary, + type: GFType.outline2x, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Disabled State', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + shape: GFButtonShape.pills, + child: Text( + "Primary", + ), + type: GFType.outline2x, + color: GFColor.primary, + ), + GFButton( + onPressed: null, + child: Text( + "Secondary", + ), + color: GFColor.secondary, + type: GFType.outline2x, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: null, + child: Text( + "Success", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Warning", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.warning, + ), + GFButton( + onPressed: null, + child: Text( + "Danger", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.danger, + ), + GFButton( + onPressed: null, + child: Text( + "Info", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Light", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.light, + ), + GFButton( + onPressed: null, + child: Text( + "Dark", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.outline2x, + shape: GFButtonShape.pills, + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline2x, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: () {}, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline2x, + shape: GFButtonShape.pills, + ), + GFButton( + onPressed: () {}, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline2x, + shape: GFButtonShape.pills, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline2x, + shape: GFButtonShape.pills, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline2x, + shape: GFButtonShape.pills, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline2x, + shape: GFButtonShape.pills, + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/demo_app/lib/screens/button/shadow-buttons.dart b/demo_app/lib/screens/button/shadow-buttons.dart new file mode 100644 index 00000000..7724c422 --- /dev/null +++ b/demo_app/lib/screens/button/shadow-buttons.dart @@ -0,0 +1,1048 @@ +import 'package:flutter/material.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; +import 'package:ui_kit/components/tabs/gf_tabs.dart'; +import 'package:ui_kit/components/button/gf_button.dart'; +import 'package:ui_kit/size/gf_size.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; +import 'package:ui_kit/types/gf_type.dart'; +import 'package:ui_kit/shape/gf_button_shape.dart'; +import 'package:ui_kit/colors/gf_color.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; + +class ShadowButtons extends StatefulWidget { + @override + _ShadowButtonsState createState() => _ShadowButtonsState(); +} + +class _ShadowButtonsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: getGFColor(GFColor.dark), + leading: GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Image.asset('lib/assets/icons/back.png')), + title: Text( + 'Shadow Buttons', + style: TextStyle(fontSize: 17), + ), + centerTitle: true, + ), +// body: GFTabs( +// height: MediaQuery.of(context).size.height, +// tabBarColor: Color(0xFFD3E9ED), +// initialIndex: 0, +// length: 3, +// indicatorColor: getGFColor(GFColor.info), +// unselectedLabelColor: getGFColor(GFColor.danger), +// labelColor: getGFColor(GFColor.warning), +// tabs: [ +// GFButton( +// onPressed: (){}, +// child: Text( +// "Solid", +// style: TextStyle(fontSize: 12), +// ), +// buttonBoxShadow: true, +// textColor: GFColor.white, +// ), +// GFButton( +// onPressed: null, +// child: Text( +// "Outline", +// style: TextStyle(fontSize: 12), +// ), +// type: GFType.outline, +// ), +// GFButton( +// onPressed: null, +// text: 'Outline 2x', +// textStyle: TextStyle(fontSize: 12, color: getGFColor(GFColor.dark)), +// type: GFType.outline2x, +// ), +// ], +// tabBarView: GFTabBarView( +// children: [ +// Container( +//// color: Colors.red, +// child: ListView( +// children: [ +// Padding(padding: EdgeInsets.only(left:15, top:30), +// child: GFTypography( +// text: 'Default', +// type: GFTypographyType.typo5, +// dividerWidth: 25, +// dividerColor: Color(0xFF19CA4B), +// +// ), +// ), +// GFCard( +// content: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// +// SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// shape: GFButtonShape.standard, +// +// buttonBoxShadow: true, +// child: Text("Primary", +// ), +// +// color: GFColor.primary, +// ), +// GFButton( +// onPressed: (){}, +// child: Text("Secondary", +// ), +// +// color: GFColor.secondary, +// buttonBoxShadow: true, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Success", +// ), +// buttonBoxShadow: true, +// color: GFColor.success, +// ), +// ], +// ), +// +// SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text( +// "Warning", +// ), +// buttonBoxShadow: true, +// color: GFColor.warning, +// ), +// GFButton( +// onPressed: (){}, +// child: Text("Danger", +// ), +// buttonBoxShadow: true, +// color: GFColor.danger, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Info", +// ), +// buttonBoxShadow: true, +// color: GFColor.info, +// ), +// ], +// ), +// SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text( +// "Light", +// ), +// buttonBoxShadow: true, +// color: GFColor.light, +// ), +// +// GFButton( +// onPressed: (){}, +// child: Text( +// "Dark", +// style: +// TextStyle(color: getGFColor(GFColor.white)), +// ), +// buttonBoxShadow: true, +// color: GFColor.dark, +// ), +// GFButton( +// onPressed: (){}, +// child: Text("Link", +// ), +// buttonBoxShadow: false, +// color: GFColor.transparent, +// ), +// ], +// ), +//SizedBox( +// height: 10, +//) +// +// ], +// ), +// ), +// +// +// +// +// Padding(padding: EdgeInsets.only(left:15, top:10), +// child: GFTypography( +// text: 'Button Sizes', +// type: GFTypographyType.typo5, +// dividerWidth: 25, +// dividerColor: Color(0xFF19CA4B), +// +// ), +// ), +// +// +// GFCard( +// content: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text("Large", +// ), +// color: GFColor.primary, +// size: GFSize.large, +// buttonBoxShadow: true, +// ), +// GFButton( +// onPressed: (){}, +// child: Text("Normal", +// ), +// color: GFColor.primary, +// size: GFSize.medium, +// buttonBoxShadow: true, +// ), +// GFButton( +// onPressed: (){}, +// child: Text("Small", +// ), +// color: GFColor.primary, +// size: GFSize.small, +// buttonBoxShadow: true, +// ), +// ], +// ), +// SizedBox( +// height: 10, +// ), +// +// ], +// ), +// ), +// +// +// Padding(padding: EdgeInsets.only(left:15, top:10), +// child: GFTypography( +// text: 'Block Buttons', +// type: GFTypographyType.typo5, +// dividerWidth: 25, +// dividerColor: Color(0xFF19CA4B), +// +// ), +// ), +// +// +// GFCard( +// content: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// SizedBox( +// height: 10, +// ), +// GFButton( +// onPressed: (){}, +// blockButton: true, +// child: Text("Large", +// style: TextStyle( +// color: getGFColor(GFColor.white))), +// color: GFColor.primary, +// size: GFSize.large, +// buttonBoxShadow: true, +// ), +// +// SizedBox( +// height: 10, +// ), +// +// GFButton( +// onPressed: (){}, +// blockButton: true, +// child: Text("Normal", +// style: TextStyle( +// color: getGFColor(GFColor.white))), +// color: GFColor.primary, +// size: GFSize.medium, +// buttonBoxShadow: true, +// ), +// +// SizedBox( +// height: 10, +// ), +// +// +// GFButton( +// onPressed: (){}, +// blockButton: true, +// child: Text("Small", +// style: TextStyle( +// color: getGFColor(GFColor.white))), +// color: GFColor.primary, +// size: GFSize.small, +// buttonBoxShadow: true, +// ), +// SizedBox( +// height: 10, +// ), +// +// ], +// ), +// ), +// ], +// ), +// ), +// +// +// //tab 2 +// Container( +//// color: Colors.red, +// child: ListView( +// children: [ +// +// Padding(padding: EdgeInsets.only(left:15, top:30), +// child: GFTypography( +// text: 'Default', +// type: GFTypographyType.typo5, +// dividerWidth: 25, +// dividerColor: Color(0xFF19CA4B), +// +// ), +// ), +// GFCard( +// content: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text( +// "Primary", +// +// ), +// +// type: GFType.outline, +// +// ), +// +// +// GFButton( +// onPressed: (){}, +// child: Text("Secondary"), +// type: GFType.outline, +// color: GFColor.secondary, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Success", +// ), +// type: GFType.outline, +// color: GFColor.success, +// ), +// ], +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text( +// "Warning", +// ), +// type: GFType.outline, +// color: GFColor.warning, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Danger", +// ), +// type: GFType.outline, +// color: GFColor.danger, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Info", +// ), +// type: GFType.outline, +// color: GFColor.info, +// ), +// ], +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text( +// "Light", +// ), +// type: GFType.outline, +// color: GFColor.light, +// ), +// +// GFButton( +// onPressed: (){}, +// child: Text( +// "Dark", +// ), +// type: GFType.outline, +// color: GFColor.dark, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Link", +// ), +// color: GFColor.transparent, +// ), +// ], +// ), +// ], +// ), +// ), +// +// +// +// Padding(padding: EdgeInsets.only(left:15, top:10), +// child: GFTypography( +// text: 'Button Sizes', +// type: GFTypographyType.typo5, +// dividerWidth: 25, +// dividerColor: Color(0xFF19CA4B), +// +// ), +// ), +// +// +// GFCard( +// content: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text("Large", +// ), +// color: GFColor.primary, +// size: GFSize.large, +// type: GFType.outline, +// ), +// GFButton( +// onPressed: (){}, +// child: Text("Normal", +// ), +// color: GFColor.primary, +// size: GFSize.medium, +// type: GFType.outline, +// ), +// GFButton( +// onPressed: (){}, +// child: Text("Small", +// ), +// color: GFColor.primary, +// size: GFSize.small, +// type: GFType.outline, +// ), +// ], +// ), +// +// ], +// ), +// ), +// +// +// Padding(padding: EdgeInsets.only(left:15, top:10), +// child: GFTypography( +// text: 'Block Buttons', +// type: GFTypographyType.typo5, +// dividerWidth: 25, +// dividerColor: Color(0xFF19CA4B), +// +// ), +// ), +// +// +// GFCard( +// content: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// SizedBox( +// height: 10, +// ), +// GFButton( +// onPressed: (){}, +// blockButton: true, +// child: Text("Large", +// ), +// color: GFColor.primary, +// size: GFSize.large, +// type: GFType.outline, +// ), +// +// SizedBox( +// height: 10, +// ), +// +// GFButton( +// onPressed: (){}, +// blockButton: true, +// child: Text("Normal", +// ), +// color: GFColor.primary, +// size: GFSize.medium, +// type: GFType.outline, +// ), +// +// SizedBox( +// height: 10, +// ), +// +// +// GFButton( +// onPressed: (){}, +// blockButton: true, +// child: Text("Small", +// ), +// color: GFColor.primary, +// size: GFSize.small, +// type: GFType.outline, +// ), +// +// ], +// ), +// ), +// +// ], +// ), +// ), +// +// +// //tab 3 +// Container( +//// color: Colors.red, +// child: ListView( +// children: [ +// +// Padding(padding: EdgeInsets.only(left:15, top:30), +// child: GFTypography( +// text: 'Default', +// type: GFTypographyType.typo5, +// dividerWidth: 25, +// dividerColor: Color(0xFF19CA4B), +// +// ), +// ), +// GFCard( +// content: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text( +// "Primary", +// +// ), +// +// type: GFType.outline2x, +// +// ), +// +// +// GFButton( +// onPressed: (){}, +// child: Text("Secondary"), +// type: GFType.outline2x, +// color: GFColor.secondary, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Success", +// ), +// type: GFType.outline2x, +// color: GFColor.success, +// ), +// ], +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text( +// "Warning", +// ), +// type: GFType.outline2x, +// color: GFColor.warning, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Danger", +// ), +// type: GFType.outline2x, +// color: GFColor.danger, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Info", +// ), +// type: GFType.outline2x, +// color: GFColor.info, +// ), +// ], +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text( +// "Light", +// ), +// type: GFType.outline2x, +// color: GFColor.light, +// ), +// +// GFButton( +// onPressed: (){}, +// child: Text( +// "Dark", +// ), +// type: GFType.outline2x, +// color: GFColor.dark, +// ), +// GFButton( +// onPressed: (){}, +// child: Text( +// "Link", +// ), +// +// color: GFColor.transparent, +// ), +// ], +// ), +// ], +// ), +// ), +// +// +// +// Padding(padding: EdgeInsets.only(left:15, top:10), +// child: GFTypography( +// text: 'Button Sizes', +// type: GFTypographyType.typo5, +// dividerWidth: 25, +// dividerColor: Color(0xFF19CA4B), +// +// ), +// ), +// +// +// GFCard( +// content: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// GFButton( +// onPressed: (){}, +// child: Text("Large", +// ), +// color: GFColor.primary, +// size: GFSize.large, +// type: GFType.outline2x, +// ), +// GFButton( +// onPressed: (){}, +// child: Text("Normal", +// ), +// color: GFColor.primary, +// size: GFSize.medium, +// type: GFType.outline2x, +// ), +// GFButton( +// onPressed: (){}, +// child: Text("Small", +// ), +// color: GFColor.primary, +// size: GFSize.small, +// type: GFType.outline2x, +// ), +// ], +// ), +// +// ], +// ), +// ), +// +// +// Padding(padding: EdgeInsets.only(left:15, top:10), +// child: GFTypography( +// text: 'Block Buttons', +// type: GFTypographyType.typo5, +// dividerWidth: 25, +// dividerColor: Color(0xFF19CA4B), +// +// ), +// ), +// +// +// GFCard( +// content: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// SizedBox( +// height: 10, +// ), +// GFButton( +// onPressed: (){}, +// blockButton: true, +// child: Text("Large", +// ), +// color: GFColor.primary, +// size: GFSize.large, +// type: GFType.outline2x, +// ), +// +// SizedBox( +// height: 10, +// ), +// +// GFButton( +// onPressed: (){}, +// blockButton: true, +// child: Text("Normal", +// ), +// color: GFColor.primary, +// size: GFSize.medium, +// type: GFType.outline2x, +// ), +// +// SizedBox( +// height: 10, +// ), +// +// +// GFButton( +// onPressed: (){}, +// blockButton: true, +// child: Text("Small", +// ), +// color: GFColor.primary, +// size: GFSize.small, +// type: GFType.outline2x, +// ), +// +// ], +// ), +// ), +// +// ], +// ), +// ), +// ], +// ), +// ), + + body: Container( +// color: Colors.red, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + shape: GFButtonShape.standard, + buttonBoxShadow: true, + child: Text( + "Primary", + ), + color: GFColor.primary, + ), + GFButton( + onPressed: () {}, + child: Text( + "Secondary", + ), + color: GFColor.secondary, + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + buttonBoxShadow: true, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + buttonBoxShadow: true, + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + buttonBoxShadow: true, + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + buttonBoxShadow: true, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + buttonBoxShadow: true, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + style: TextStyle(color: getGFColor(GFColor.white)), + ), + buttonBoxShadow: true, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + buttonBoxShadow: false, + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ) + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + buttonBoxShadow: true, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Large", + style: TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.large, + buttonBoxShadow: true, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Normal", + style: TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.medium, + buttonBoxShadow: true, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Small", + style: TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.small, + buttonBoxShadow: true, + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/demo_app/lib/screens/button/social-buttons.dart b/demo_app/lib/screens/button/social-buttons.dart new file mode 100644 index 00000000..0d8bf3ea --- /dev/null +++ b/demo_app/lib/screens/button/social-buttons.dart @@ -0,0 +1,331 @@ +import 'package:flutter/material.dart'; +import 'package:ui_kit/colors/gf_color.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; +import 'package:ui_kit/components/button/gf_button.dart'; +import 'package:ui_kit/components/button/gf_icon_button.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/shape/gf_icon_button_shape.dart'; +import 'package:ui_kit/types/gf_type.dart'; +import 'package:ui_kit/size/gf_size.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class SocialButtons extends StatefulWidget { + @override + _SocialButtonsState createState() => _SocialButtonsState(); +} + +class _SocialButtonsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: getGFColor(GFColor.dark), + leading: GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Image.asset('lib/assets/icons/back.png')), + title: Text( + 'Social Buttons', + style: TextStyle(fontSize: 17), + ), + centerTitle: true, + ), + body: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'Social Buttons Full', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GFButton( + buttonBoxShadow: true, + color: Color(0xFF3B5998), + onPressed: () {}, + child: Text( + "FB", + ), + icon: SvgPicture.asset('lib/assets/icons/fb.svg')), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text("Twitter"), + icon: SvgPicture.asset('lib/assets/icons/twitter.svg'), + color: Color(0xFF00ACEE), + buttonBoxShadow: true, + ), + ), + SizedBox( + width: 6, + ), + Expanded( + child: GFButton( + onPressed: () {}, + child: Text( + "Whatsap", + ), + icon: SvgPicture.asset('lib/assets/icons/whatsapp.svg'), + color: Color(0xFF25D366), + buttonBoxShadow: true, + ), + ) + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Google +", + ), + icon: SvgPicture.asset('lib/assets/icons/google.svg'), + color: Color(0xFFDD4B39), + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dribble", + ), + icon: SvgPicture.asset('lib/assets/icons/dribble.svg'), + color: Color(0xFFEA4C89), + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "LinkedIn", + ), + icon: SvgPicture.asset('lib/assets/icons/linkedin.svg'), + color: Color(0xFF0E76A8), + buttonBoxShadow: true, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Youtube", + ), + icon: SvgPicture.asset('lib/assets/icons/youtube.svg'), + color: Color(0xFFC4302B), + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Slack", + style: TextStyle(color: getGFColor(GFColor.white)), + ), + icon: SvgPicture.asset('lib/assets/icons/slack.svg'), + color: Color(0XFF2EB67D), + buttonBoxShadow: true, + ), + GFButton( + onPressed: () {}, + child: Text( + "Pinterest", + ), + icon: SvgPicture.asset('lib/assets/icons/pinterest.svg'), + color: Color(0XFFC8232C), + buttonBoxShadow: true, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'Social Buttons Icons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFIconButton( + color: Color(0xFF3B5998), + icon: SvgPicture.asset('lib/assets/icons/fb.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFF00ACEE), + icon: SvgPicture.asset('lib/assets/icons/twitter.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFF25D366), + icon: SvgPicture.asset('lib/assets/icons/whatsapp.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFFDD4B39), + icon: SvgPicture.asset('lib/assets/icons/google.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFFEA4C89), + icon: SvgPicture.asset('lib/assets/icons/dribble.svg'), + onPressed: () {}), + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFIconButton( + color: Color(0xFF0E76A8), + icon: SvgPicture.asset('lib/assets/icons/linkedin.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFFC4302B), + icon: SvgPicture.asset('lib/assets/icons/youtube.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0XFF2EB67D), + icon: SvgPicture.asset('lib/assets/icons/slack.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0XFFC8232C), + icon: + SvgPicture.asset('lib/assets/icons/pinterest.svg'), + onPressed: () {}), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'Floating Social Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFIconButton( + color: Color(0xFF3B5998), + shape: GFIconButtonShape.pills, + icon: SvgPicture.asset('lib/assets/icons/fb.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFF00ACEE), + shape: GFIconButtonShape.pills, + icon: SvgPicture.asset('lib/assets/icons/twitter.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFF25D366), + shape: GFIconButtonShape.pills, + icon: SvgPicture.asset('lib/assets/icons/whatsapp.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFFDD4B39), + shape: GFIconButtonShape.pills, + icon: SvgPicture.asset('lib/assets/icons/google.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFFEA4C89), + shape: GFIconButtonShape.pills, + icon: SvgPicture.asset('lib/assets/icons/dribble.svg'), + onPressed: () {}), + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFIconButton( + color: Color(0xFF0E76A8), + shape: GFIconButtonShape.pills, + icon: SvgPicture.asset('lib/assets/icons/linkedin.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0xFFC4302B), + shape: GFIconButtonShape.pills, + icon: SvgPicture.asset('lib/assets/icons/youtube.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0XFF2EB67D), + shape: GFIconButtonShape.pills, + icon: SvgPicture.asset('lib/assets/icons/slack.svg'), + onPressed: () {}), + GFIconButton( + color: Color(0XFFC8232C), + shape: GFIconButtonShape.pills, + icon: + SvgPicture.asset('lib/assets/icons/pinterest.svg'), + onPressed: () {}), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/demo_app/lib/screens/buttons.dart b/demo_app/lib/screens/button/square-buttons.dart similarity index 52% rename from demo_app/lib/screens/buttons.dart rename to demo_app/lib/screens/button/square-buttons.dart index 0a7055e3..6c875bd6 100644 --- a/demo_app/lib/screens/buttons.dart +++ b/demo_app/lib/screens/button/square-buttons.dart @@ -1,29 +1,36 @@ import 'package:flutter/material.dart'; -import 'package:ui_kit/components/header/gf_header.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; import 'package:ui_kit/components/tabs/gf_tabs.dart'; import 'package:ui_kit/components/button/gf_button.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/size/gf_size.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; import 'package:ui_kit/types/gf_type.dart'; import 'package:ui_kit/shape/gf_button_shape.dart'; import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/card/gf_card.dart'; import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; -class Buttons extends StatefulWidget { +class SquareButtons extends StatefulWidget { @override - _ButtonsState createState() => _ButtonsState(); + _SquareButtonsState createState() => _SquareButtonsState(); } -class _ButtonsState extends State { +class _SquareButtonsState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: getGFColor(GFColor.dark), + leading: GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Image.asset('lib/assets/icons/back.png')), title: Text( - 'Buttons', - style: TextStyle(fontSize: 14), + 'Square Buttons', + style: TextStyle(fontSize: 17), ), + centerTitle: true, ), body: GFTabs( height: MediaQuery.of(context).size.height, @@ -40,8 +47,8 @@ class _ButtonsState extends State { "Solid", style: TextStyle(fontSize: 12), ), - type: GFType.solid, textColor: GFColor.white, + shape: GFButtonShape.square, ), GFButton( onPressed: null, @@ -50,13 +57,14 @@ class _ButtonsState extends State { style: TextStyle(fontSize: 12), ), type: GFType.outline, - shape: GFButtonShape.pills, + shape: GFButtonShape.square, ), GFButton( onPressed: null, - text: 'Transparent', + text: 'Outline 2x', textStyle: TextStyle(fontSize: 12, color: getGFColor(GFColor.dark)), - type: GFType.transparent, + type: GFType.outline2x, + shape: GFButtonShape.square, ), ], tabBarView: GFTabBarView( @@ -65,15 +73,20 @@ class _ButtonsState extends State { // color: Colors.red, child: ListView( children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), GFCard( content: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFHeader( - text: 'Standard', - type: GFHeadingType.typo6, - ), SizedBox( height: 10, ), @@ -81,116 +94,114 @@ class _ButtonsState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, - child: Text("Primary", - style: TextStyle( - color: getGFColor(GFColor.white))), - type: GFType.solid, + onPressed: () {}, + shape: GFButtonShape.square, + child: Text( + "Primary", + ), color: GFColor.primary, ), GFButton( - onPressed: null, - child: Text("Secondary", - style: TextStyle( - color: getGFColor(GFColor.white))), - type: GFType.solid, + onPressed: () {}, + child: Text( + "Secondary", + ), color: GFColor.secondary, + shape: GFButtonShape.square, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Success", ), - type: GFType.solid, + shape: GFButtonShape.square, color: GFColor.success, ), ], ), + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Warning", ), - type: GFType.solid, + shape: GFButtonShape.square, color: GFColor.warning, ), GFButton( - onPressed: null, - child: Text("Danger", - style: TextStyle( - color: getGFColor(GFColor.white))), - type: GFType.solid, + onPressed: () {}, + child: Text( + "Danger", + ), + shape: GFButtonShape.square, color: GFColor.danger, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Light", + "Info", ), - type: GFType.solid, - color: GFColor.light, + shape: GFButtonShape.square, + color: GFColor.info, ), ], ), + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Info", + "Light", ), - type: GFType.solid, - color: GFColor.info, - ), - GFButton( - onPressed: null, - child: Text("Alt", - style: TextStyle( - color: getGFColor(GFColor.white))), - type: GFType.solid, - color: GFColor.alt, + shape: GFButtonShape.square, + color: GFColor.light, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Dark", - style: - TextStyle(color: getGFColor(GFColor.white)), ), - type: GFType.solid, + shape: GFButtonShape.square, color: GFColor.dark, ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Transparent", + "Link", ), - type: GFType.solid, color: GFColor.transparent, ), ], - ) + ), + SizedBox( + height: 10, + ), ], ), ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Disabled State', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), GFCard( content: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFHeader( - text: 'Pills', - type: GFHeadingType.typo6, - ), SizedBox( height: 10, ), @@ -199,30 +210,33 @@ class _ButtonsState extends State { children: [ GFButton( onPressed: null, - child: Text("Primary", - style: TextStyle( - color: getGFColor(GFColor.white))), + shape: GFButtonShape.square, + child: Text( + "Primary", + ), color: GFColor.primary, - shape: GFButtonShape.pills, ), GFButton( onPressed: null, - child: Text("Secondary", - style: TextStyle( - color: getGFColor(GFColor.white))), + child: Text( + "Secondary", + ), color: GFColor.secondary, - shape: GFButtonShape.pills, + shape: GFButtonShape.square, ), GFButton( onPressed: null, child: Text( "Success", ), - shape: GFButtonShape.pills, + shape: GFButtonShape.square, color: GFColor.success, ), ], ), + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -231,83 +245,78 @@ class _ButtonsState extends State { child: Text( "Warning", ), - shape: GFButtonShape.pills, + shape: GFButtonShape.square, color: GFColor.warning, ), GFButton( onPressed: null, - child: Text("Danger", - style: TextStyle( - color: getGFColor(GFColor.white))), - shape: GFButtonShape.pills, + child: Text( + "Danger", + ), + shape: GFButtonShape.square, color: GFColor.danger, ), GFButton( onPressed: null, child: Text( - "Light", + "Info", ), - shape: GFButtonShape.pills, - color: GFColor.light, + shape: GFButtonShape.square, + color: GFColor.info, ), ], ), + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( onPressed: null, child: Text( - "Info", + "Light", ), - shape: GFButtonShape.pills, - color: GFColor.info, - ), - GFButton( - onPressed: null, - child: Text("Alt", - style: TextStyle( - color: getGFColor(GFColor.white))), - shape: GFButtonShape.pills, - color: GFColor.alt, + shape: GFButtonShape.square, + color: GFColor.light, ), GFButton( onPressed: null, child: Text( "Dark", - style: - TextStyle(color: getGFColor(GFColor.white)), ), - shape: GFButtonShape.pills, + shape: GFButtonShape.square, color: GFColor.dark, ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ GFButton( onPressed: null, child: Text( - "Transparent", + "link", ), - shape: GFButtonShape.pills, color: GFColor.transparent, ), ], - ) + ), + SizedBox( + height: 10, + ), ], ), ), + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), GFCard( content: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFHeader( - text: 'Square', - type: GFHeadingType.typo6, - ), SizedBox( height: 10, ), @@ -315,123 +324,122 @@ class _ButtonsState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, - child: Text("Primary", + onPressed: () {}, + child: Text("Large", style: TextStyle( color: getGFColor(GFColor.white))), color: GFColor.primary, + size: GFSize.large, shape: GFButtonShape.square, ), GFButton( - onPressed: null, - child: Text("Secondary", + onPressed: () {}, + child: Text("Normal", style: TextStyle( color: getGFColor(GFColor.white))), - color: GFColor.secondary, - shape: GFButtonShape.square, - ), - GFButton( - onPressed: null, - child: Text( - "Success", - ), - shape: GFButtonShape.square, - color: GFColor.success, - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - GFButton( - onPressed: null, - child: Text( - "Warning", - ), + color: GFColor.primary, + size: GFSize.medium, shape: GFButtonShape.square, - color: GFColor.warning, ), GFButton( - onPressed: null, - child: Text("Danger", + onPressed: () {}, + child: Text("Small", style: TextStyle( color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.small, shape: GFButtonShape.square, - color: GFColor.danger, - ), - GFButton( - onPressed: null, - child: Text( - "Light", - ), - shape: GFButtonShape.square, - color: GFColor.light, ), ], ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - GFButton( - onPressed: null, - child: Text( - "Info", - ), - shape: GFButtonShape.square, - color: GFColor.info, - ), - GFButton( - onPressed: null, - child: Text("Alt", - style: TextStyle( - color: getGFColor(GFColor.white))), - shape: GFButtonShape.square, - color: GFColor.alt, - ), - GFButton( - onPressed: null, - child: Text( - "Dark", - style: - TextStyle(color: getGFColor(GFColor.white)), - ), - shape: GFButtonShape.square, - color: GFColor.dark, - ), - ], + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 20), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Large", + style: + TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.large, + shape: GFButtonShape.square, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Normal", + style: + TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.medium, + shape: GFButtonShape.square, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Small", + style: + TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.small, + shape: GFButtonShape.square, + ), + SizedBox( + height: 10, ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - GFButton( - onPressed: null, - child: Text( - "Transparent", - ), - shape: GFButtonShape.square, - color: GFColor.transparent, - ), - ], - ) ], ), ), ], ), ), + + //tab 2 Container( // color: Colors.red, child: ListView( children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), GFCard( content: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFHeader( - text: 'Standard', - type: GFHeadingType.typo6, - ), SizedBox( height: 10, ), @@ -439,98 +447,122 @@ class _ButtonsState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, + onPressed: () {}, + shape: GFButtonShape.square, child: Text( "Primary", ), type: GFType.outline, + color: GFColor.primary, ), GFButton( - onPressed: null, - child: Text("Secondary"), - type: GFType.outline, + onPressed: () {}, + child: Text( + "Secondary", + ), color: GFColor.secondary, + type: GFType.outline, + shape: GFButtonShape.square, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Success", ), type: GFType.outline, + shape: GFButtonShape.square, color: GFColor.success, ), ], ), + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Warning", ), type: GFType.outline, + shape: GFButtonShape.square, color: GFColor.warning, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Danger", ), type: GFType.outline, + shape: GFButtonShape.square, color: GFColor.danger, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Light", + "Info", ), type: GFType.outline, - color: GFColor.light, + shape: GFButtonShape.square, + color: GFColor.info, ), ], ), + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Info", + "Light", ), type: GFType.outline, - color: GFColor.info, + shape: GFButtonShape.square, + color: GFColor.light, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Alt", + "Dark", ), type: GFType.outline, - color: GFColor.alt, + shape: GFButtonShape.square, + color: GFColor.dark, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Dark", + "Link", ), - type: GFType.outline, - color: GFColor.dark, + color: GFColor.transparent, ), ], ), + SizedBox( + height: 10, + ), ], ), ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Disabled State', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), GFCard( content: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFHeader( - text: 'Pills', - type: GFHeadingType.typo6, - ), SizedBox( height: 10, ), @@ -539,12 +571,12 @@ class _ButtonsState extends State { children: [ GFButton( onPressed: null, + shape: GFButtonShape.square, child: Text( "Primary", ), type: GFType.outline, color: GFColor.primary, - shape: GFButtonShape.pills, ), GFButton( onPressed: null, @@ -552,20 +584,23 @@ class _ButtonsState extends State { "Secondary", ), color: GFColor.secondary, - shape: GFButtonShape.pills, type: GFType.outline, + shape: GFButtonShape.square, ), GFButton( onPressed: null, child: Text( "Success", ), - shape: GFButtonShape.pills, - color: GFColor.success, type: GFType.outline, + shape: GFButtonShape.square, + color: GFColor.success, ), ], ), + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -574,74 +609,212 @@ class _ButtonsState extends State { child: Text( "Warning", ), - shape: GFButtonShape.pills, - color: GFColor.warning, type: GFType.outline, + shape: GFButtonShape.square, + color: GFColor.warning, ), GFButton( onPressed: null, child: Text( "Danger", ), - shape: GFButtonShape.pills, + type: GFType.outline, + shape: GFButtonShape.square, color: GFColor.danger, + ), + GFButton( + onPressed: null, + child: Text( + "Info", + ), type: GFType.outline, + shape: GFButtonShape.square, + color: GFColor.info, ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ GFButton( onPressed: null, child: Text( "Light", ), - shape: GFButtonShape.pills, + type: GFType.outline, + shape: GFButtonShape.square, color: GFColor.light, + ), + GFButton( + onPressed: null, + child: Text( + "Dark", + ), type: GFType.outline, + shape: GFButtonShape.square, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + color: GFColor.transparent, ), ], ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Info", + "Large", ), - shape: GFButtonShape.pills, - color: GFColor.info, + color: GFColor.primary, + size: GFSize.large, type: GFType.outline, + shape: GFButtonShape.square, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Alt", + "Normal", ), - shape: GFButtonShape.pills, - color: GFColor.alt, + color: GFColor.primary, + size: GFSize.medium, type: GFType.outline, + shape: GFButtonShape.square, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( - "Dark", + "Small", ), - shape: GFButtonShape.pills, - color: GFColor.dark, + color: GFColor.primary, + size: GFSize.small, type: GFType.outline, + shape: GFButtonShape.square, ), ], ), + SizedBox( + height: 10, + ), ], ), ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), GFCard( content: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFHeader( - text: 'Square', - type: GFHeadingType.typo6, + SizedBox( + height: 10, ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline, + shape: GFButtonShape.square, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline, + shape: GFButtonShape.square, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline, + shape: GFButtonShape.square, + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + ), + ), + + //tab 3 + Container( +// color: Colors.red, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ SizedBox( height: 10, ), @@ -649,199 +822,354 @@ class _ButtonsState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, + onPressed: () {}, + shape: GFButtonShape.square, child: Text( "Primary", ), - type: GFType.outline, + type: GFType.outline2x, color: GFColor.primary, - shape: GFButtonShape.square, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Secondary", ), color: GFColor.secondary, + type: GFType.outline2x, shape: GFButtonShape.square, - type: GFType.outline, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Success", ), + type: GFType.outline2x, shape: GFButtonShape.square, color: GFColor.success, - type: GFType.outline, ), ], ), + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Warning", ), + type: GFType.outline2x, shape: GFButtonShape.square, color: GFColor.warning, - type: GFType.outline, ), GFButton( - onPressed: null, + onPressed: () {}, child: Text( "Danger", ), + type: GFType.outline2x, shape: GFButtonShape.square, color: GFColor.danger, - type: GFType.outline, ), GFButton( - onPressed: null, + onPressed: () {}, + child: Text( + "Info", + ), + type: GFType.outline2x, + shape: GFButtonShape.square, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, child: Text( "Light", ), + type: GFType.outline2x, shape: GFButtonShape.square, color: GFColor.light, - type: GFType.outline, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + ), + type: GFType.outline2x, + shape: GFButtonShape.square, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Disabled State', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + shape: GFButtonShape.square, + child: Text( + "Primary", + ), + type: GFType.outline2x, + color: GFColor.primary, + ), + GFButton( + onPressed: null, + child: Text( + "Secondary", + ), + color: GFColor.secondary, + type: GFType.outline2x, + shape: GFButtonShape.square, + ), + GFButton( + onPressed: null, + child: Text( + "Success", + ), + type: GFType.outline2x, + shape: GFButtonShape.square, + color: GFColor.success, ), ], ), + SizedBox( + height: 10, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + GFButton( + onPressed: null, + child: Text( + "Warning", + ), + type: GFType.outline2x, + shape: GFButtonShape.square, + color: GFColor.warning, + ), + GFButton( + onPressed: null, + child: Text( + "Danger", + ), + type: GFType.outline2x, + shape: GFButtonShape.square, + color: GFColor.danger, + ), GFButton( onPressed: null, child: Text( "Info", ), + type: GFType.outline2x, shape: GFButtonShape.square, color: GFColor.info, - type: GFType.outline, ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ GFButton( onPressed: null, child: Text( - "Alt", + "Light", ), + type: GFType.outline2x, shape: GFButtonShape.square, - color: GFColor.alt, - type: GFType.outline, + color: GFColor.light, ), GFButton( onPressed: null, child: Text( "Dark", ), + type: GFType.outline2x, shape: GFButtonShape.square, color: GFColor.dark, - type: GFType.outline, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + color: GFColor.transparent, ), ], ), + SizedBox( + height: 10, + ), ], ), ), - ], - ), - ), - Container( - margin: EdgeInsets.only(top: 20, right: 20, left: 20), - height: 100, - child: Column( - children: [ - GFHeader( - text: 'Transparent', - type: GFHeadingType.typo6, + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), ), - Row( + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFButton( - onPressed: null, - child: Text( - "Primary", - ), - type: GFType.transparent, - textColor: GFColor.primary, + SizedBox( + height: 10, ), - GFButton( - onPressed: null, - child: Text( - "Secondary", - ), - type: GFType.transparent, - textColor: GFColor.secondary, + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline2x, + shape: GFButtonShape.square, + ), + GFButton( + onPressed: () {}, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline2x, + shape: GFButtonShape.square, + ), + GFButton( + onPressed: () {}, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline2x, + shape: GFButtonShape.square, + ), + ], ), - GFButton( - onPressed: null, - child: Text( - "Success", - ), - type: GFType.transparent, - textColor: GFColor.success, + SizedBox( + height: 10, ), ], ), - Row( + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - GFButton( - onPressed: null, - child: Text( - "Warning", - ), - type: GFType.transparent, - textColor: GFColor.warning, + SizedBox( + height: 10, ), GFButton( - onPressed: null, + onPressed: () {}, + blockButton: true, child: Text( - "Danger", + "Large", ), - type: GFType.transparent, - textColor: GFColor.danger, + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline2x, + shape: GFButtonShape.square, ), - GFButton( - onPressed: null, - child: Text( - "Dark", - ), - type: GFType.transparent, - textColor: GFColor.dark, + SizedBox( + height: 10, ), - ], - ), - Row( - children: [ GFButton( - onPressed: null, + onPressed: () {}, + blockButton: true, child: Text( - "Light", + "Normal", ), - type: GFType.transparent, - textColor: GFColor.light, + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline2x, + shape: GFButtonShape.square, ), - GFButton( - onPressed: null, - child: Text( - "Info", - ), - type: GFType.transparent, - textColor: GFColor.info, + SizedBox( + height: 10, ), GFButton( - onPressed: null, + onPressed: () {}, + blockButton: true, child: Text( - "Alt", + "Small", ), - type: GFType.transparent, - textColor: GFColor.alt, + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline2x, + shape: GFButtonShape.square, + ), + SizedBox( + height: 10, ), ], ), - ], - )) + ), + ], + ), + ), ], ), ), diff --git a/demo_app/lib/screens/button/standard-buttons.dart b/demo_app/lib/screens/button/standard-buttons.dart new file mode 100644 index 00000000..0f1e3b70 --- /dev/null +++ b/demo_app/lib/screens/button/standard-buttons.dart @@ -0,0 +1,1213 @@ +import 'package:flutter/material.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; +import 'package:ui_kit/components/tabs/gf_tabs.dart'; +import 'package:ui_kit/components/button/gf_button.dart'; +import 'package:ui_kit/size/gf_size.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; +import 'package:ui_kit/types/gf_toggle_type.dart'; +import 'package:ui_kit/types/gf_type.dart'; +import 'package:ui_kit/shape/gf_button_shape.dart'; +import 'package:ui_kit/colors/gf_color.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; + +class StandardButtons extends StatefulWidget { + @override + _StandardButtonsState createState() => _StandardButtonsState(); +} + +class _StandardButtonsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: getGFColor(GFColor.dark), + leading: GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Image.asset('lib/assets/icons/back.png')), + title: Text( + 'Standard Buttons', + style: TextStyle(fontSize: 17), + ), + centerTitle: true, + ), + body: GFTabs( + height: MediaQuery.of(context).size.height, + tabBarColor: Color(0xFFD3E9ED), + initialIndex: 0, + length: 3, + indicatorColor: getGFColor(GFColor.info), + unselectedLabelColor: getGFColor(GFColor.danger), + labelColor: getGFColor(GFColor.warning), + tabs: [ + GFButton( + onPressed: null, + child: Text( + "Solid", + style: TextStyle(fontSize: 12), + ), + type: GFType.solid, + textColor: GFColor.white, + ), + GFButton( + onPressed: null, + child: Text( + "Outline", + style: TextStyle(fontSize: 12), + ), + type: GFType.outline, + ), + GFButton( + onPressed: null, + text: 'Outline 2x', + textStyle: TextStyle(fontSize: 12, color: getGFColor(GFColor.dark)), + type: GFType.outline2x, + ), + ], + tabBarView: GFTabBarView( + children: [ + Container( +// color: Colors.red, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + shape: GFButtonShape.standard, + child: Text("Primary", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + ), + GFButton( + onPressed: () {}, + child: Text("Secondary", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.secondary, + ), + GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + child: Text("Danger", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + style: + TextStyle(color: getGFColor(GFColor.white)), + ), + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.solid, + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Disabled State', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + shape: GFButtonShape.standard, + child: Text("Primary", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + ), + GFButton( + onPressed: null, + child: Text("Secondary", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.secondary, + ), + GFButton( + onPressed: null, + child: Text( + "Success", + ), + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Warning", + ), + color: GFColor.warning, + ), + GFButton( + onPressed: null, + child: Text("Danger", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.danger, + ), + GFButton( + onPressed: null, + child: Text( + "Info", + ), + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Light", + ), + color: GFColor.light, + ), + GFButton( + onPressed: null, + child: Text( + "Dark", + style: + TextStyle(color: getGFColor(GFColor.white)), + ), + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.solid, + color: GFColor.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Transparent Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Primary", + ), + type: GFType.transparent, + textColor: GFColor.primary, + ), + GFButton( + onPressed: () {}, + child: Text( + "Secondary", + ), + type: GFType.transparent, + textColor: GFColor.secondary, + ), + GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + type: GFType.transparent, + textColor: GFColor.success, + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + type: GFType.transparent, + textColor: GFColor.warning, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + type: GFType.transparent, + textColor: GFColor.danger, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + type: GFType.transparent, + textColor: GFColor.info, + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + type: GFType.transparent, + textColor: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + ), + type: GFType.transparent, + textColor: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text("Large", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.large, + ), + GFButton( + onPressed: () {}, + child: Text("Normal", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.medium, + ), + GFButton( + onPressed: () {}, + child: Text("Small", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.small, + ), + SizedBox( + height: 10, + ), + ], + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Large", + style: + TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.large, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Normal", + style: + TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.medium, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text("Small", + style: + TextStyle(color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.small, + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + ), + ), + + //tab 2 + Container( +// color: Colors.red, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Primary", + ), + type: GFType.outline, + ), + GFButton( + onPressed: () {}, + child: Text("Secondary"), + type: GFType.outline, + color: GFColor.secondary, + ), + GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + type: GFType.outline, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + type: GFType.outline, + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + type: GFType.outline, + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + type: GFType.outline, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + type: GFType.outline, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + ), + type: GFType.outline, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Disabled State', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Primary", + ), + type: GFType.outline, + ), + GFButton( + onPressed: null, + child: Text("Secondary"), + type: GFType.outline, + color: GFColor.secondary, + ), + GFButton( + onPressed: null, + child: Text( + "Success", + ), + type: GFType.outline, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + type: GFType.outline, + color: GFColor.warning, + ), + GFButton( + onPressed: null, + child: Text( + "Danger", + ), + type: GFType.outline, + color: GFColor.danger, + ), + GFButton( + onPressed: null, + child: Text( + "Info", + ), + type: GFType.outline, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Light", + ), + type: GFType.outline, + color: GFColor.light, + ), + GFButton( + onPressed: null, + child: Text( + "Dark", + ), + type: GFType.outline, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline, + ), + GFButton( + onPressed: () {}, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline, + ), + GFButton( + onPressed: () {}, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline, + ), + SizedBox( + height: 10, + ), + ], + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline, + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + ), + ), + + //tab 3 + Container( +// color: Colors.red, + child: ListView( + children: [ + Padding( + padding: EdgeInsets.only(left: 15, top: 30), + child: GFTypography( + text: 'Default', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Primary", + ), + type: GFType.outline2x, + ), + GFButton( + onPressed: () {}, + child: Text("Secondary"), + type: GFType.outline2x, + color: GFColor.secondary, + ), + GFButton( + onPressed: () {}, + child: Text( + "Success", + ), + type: GFType.outline2x, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + type: GFType.outline2x, + color: GFColor.warning, + ), + GFButton( + onPressed: () {}, + child: Text( + "Danger", + ), + type: GFType.outline2x, + color: GFColor.danger, + ), + GFButton( + onPressed: () {}, + child: Text( + "Info", + ), + type: GFType.outline2x, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Light", + ), + type: GFType.outline2x, + color: GFColor.light, + ), + GFButton( + onPressed: () {}, + child: Text( + "Dark", + ), + type: GFType.outline2x, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Disabled State', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Primary", + ), + type: GFType.outline2x, + ), + GFButton( + onPressed: null, + child: Text("Secondary"), + type: GFType.outline2x, + color: GFColor.secondary, + ), + GFButton( + onPressed: null, + child: Text( + "Success", + ), + type: GFType.outline2x, + color: GFColor.success, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Warning", + ), + type: GFType.outline2x, + color: GFColor.warning, + ), + GFButton( + onPressed: null, + child: Text( + "Danger", + ), + type: GFType.outline2x, + color: GFColor.danger, + ), + GFButton( + onPressed: null, + child: Text( + "Info", + ), + type: GFType.outline2x, + color: GFColor.info, + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: null, + child: Text( + "Light", + ), + type: GFType.outline2x, + color: GFColor.light, + ), + GFButton( + onPressed: null, + child: Text( + "Dark", + ), + type: GFType.outline2x, + color: GFColor.dark, + ), + GFButton( + onPressed: () {}, + child: Text( + "Link", + ), + type: GFType.transparent, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Button Sizes', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFButton( + onPressed: () {}, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline2x, + ), + GFButton( + onPressed: () {}, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline2x, + ), + GFButton( + onPressed: () {}, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline2x, + ), + SizedBox( + height: 10, + ), + ], + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(left: 15, top: 10), + child: GFTypography( + text: 'Block Buttons', + type: GFTypographyType.typo5, + dividerWidth: 25, + dividerColor: Color(0xFF19CA4B), + ), + ), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Large", + ), + color: GFColor.primary, + size: GFSize.large, + type: GFType.outline2x, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Normal", + ), + color: GFColor.primary, + size: GFSize.medium, + type: GFType.outline2x, + ), + SizedBox( + height: 10, + ), + GFButton( + onPressed: () {}, + blockButton: true, + child: Text( + "Small", + ), + color: GFColor.primary, + size: GFSize.small, + type: GFType.outline2x, + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/demo_app/lib/screens/cards.dart b/demo_app/lib/screens/cards.dart index 9b5b449c..edc00409 100644 --- a/demo_app/lib/screens/cards.dart +++ b/demo_app/lib/screens/cards.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; import 'package:ui_kit/components/card/gf_card.dart'; -import 'package:ui_kit/components/header/gf_header.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; import 'package:ui_kit/components/list_tile/gf_list_tile.dart'; import 'package:ui_kit/components/avatar/gf_avatar.dart'; import 'package:ui_kit/position/gf_position.dart'; import 'package:ui_kit/components/button/gf_icon_button.dart'; -import 'package:ui_kit/components/button_bar/gf_button_bar.dart'; +import 'package:ui_kit/components/button/gf_button_bar.dart'; import 'package:ui_kit/components/button/gf_button.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; import 'package:ui_kit/types/gf_type.dart'; import 'package:ui_kit/colors/gf_color.dart'; class Cards extends StatefulWidget { @@ -26,9 +26,9 @@ class _CardsState extends State { body: ListView( children: [ Padding(padding: EdgeInsets.all(20), child: - GFHeader( + GFTypography( text: 'Basic Card', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ),), GFCard( boxFit: BoxFit.cover, @@ -61,9 +61,9 @@ class _CardsState extends State { ), Padding(padding: EdgeInsets.all(20), child: - GFHeader( + GFTypography( text: 'Basic Card 1', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ),), GFCard( boxFit: BoxFit.cover, @@ -101,9 +101,9 @@ class _CardsState extends State { ), Padding(padding: EdgeInsets.all(20), child: - GFHeader( + GFTypography( text: 'Basic Card 2', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ),), GFCard( boxFit: BoxFit.cover, @@ -157,9 +157,9 @@ class _CardsState extends State { ), Padding(padding: EdgeInsets.all(20), child: - GFHeader( + GFTypography( text: 'Basic Card 3', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ),), GFCard( boxFit: BoxFit.cover, @@ -214,9 +214,9 @@ class _CardsState extends State { ), ), Padding(padding: EdgeInsets.all(20), child: - GFHeader( + GFTypography( text: 'Basic Card 4', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ),), GFCard( @@ -263,9 +263,9 @@ class _CardsState extends State { ), Padding(padding: EdgeInsets.all(20), child: - GFHeader( + GFTypography( text: 'Basic Card 5', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ),), GFCard( boxFit: BoxFit.cover, diff --git a/demo_app/lib/screens/headers.dart b/demo_app/lib/screens/headers.dart index 20517021..2f1db46f 100644 --- a/demo_app/lib/screens/headers.dart +++ b/demo_app/lib/screens/headers.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/avatar/gf_avatar.dart'; import 'package:ui_kit/components/card/gf_card.dart'; -import 'package:ui_kit/components/header/gf_header.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; class Headers extends StatefulWidget { @override @@ -31,29 +31,29 @@ class _HeadersState extends State { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - GFHeader( + GFTypography( text: 'GF Header Typo1', - type: GFHeadingType.typo1, + type: GFTypographyType.typo1, backgroundImage: NetworkImage( 'https://cdn.pixabay.com/photo/2019/12/25/16/49/happy-new-year-4718894_960_720.png'), ), SizedBox( height: 40, ), - GFHeader( + GFTypography( icon: GFAvatar(), text: 'GF Header Typo2', - type: GFHeadingType.typo2, + type: GFTypographyType.typo2, dividerColor: GFColor.primary, dividerAlignment: Alignment.center, ), SizedBox( height: 40, ), - GFHeader( + GFTypography( icon: Icon(Icons.insert_emoticon), text: 'GF Header Typo3', - type: GFHeadingType.typo3, + type: GFTypographyType.typo3, dividerWidth: 150, dividerColor: GFColor.warning, dividerBorderRadius: BorderRadius.all(Radius.circular(0)), @@ -61,9 +61,9 @@ class _HeadersState extends State { SizedBox( height: 40, ), - GFHeader( + GFTypography( text: 'GF Header Typo4', - type: GFHeadingType.typo4, + type: GFTypographyType.typo4, dividerWidth: 345, icon: Image.network( 'https://cdn.pixabay.com/photo/2016/12/15/03/27/cocoa-1908020_960_720.jpg', @@ -72,17 +72,17 @@ class _HeadersState extends State { SizedBox( height: 40, ), - GFHeader( + GFTypography( text: 'GF Header Typo5', - type: GFHeadingType.typo5, + type: GFTypographyType.typo5, dividerColor: GFColor.alt, ), SizedBox( height: 40, ), - GFHeader( + GFTypography( text: 'GF Header Typo6', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, dividerWidth: 20, ), ], diff --git a/demo_app/lib/screens/home.dart b/demo_app/lib/screens/home.dart index 926acdd3..2f3add5e 100644 --- a/demo_app/lib/screens/home.dart +++ b/demo_app/lib/screens/home.dart @@ -1,3 +1,4 @@ +import 'package:demo_app/screens/button/button-types.dart'; import 'package:demo_app/screens/cards.dart'; import 'package:demo_app/screens/icon-button.dart'; import 'package:demo_app/screens/list-tiles.dart'; @@ -5,11 +6,12 @@ import 'package:flutter/material.dart'; import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/card/gf_card.dart'; import 'avatars.dart'; -import 'buttons.dart'; import 'toggles.dart'; import 'headers.dart'; import 'toasts.dart'; -import 'badges.dart'; +import '../screens/badges/badges.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import '../screens/button/standard-buttons.dart'; class HomePage extends StatefulWidget { @override @@ -20,307 +22,669 @@ class _HomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - backgroundColor: getGFColor(GFColor.dark), - title: Text( - 'GET FLUTTER', - style: TextStyle(fontSize: 14), + appBar: AppBar( + backgroundColor: getGFColor(GFColor.dark), + title: Image.asset('lib/assets/logo/logo.png'), + centerTitle: true, ), - centerTitle: true, - ), -// body: Container( -// child: Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Expanded(child: GestureDetector( -// onTap: (){ -// Navigator.push( -// context, -// MaterialPageRoute( -// builder: (BuildContext context) => Buttons()), -// ); -// }, -// child: GFCard( -// color: getGFColor(GFColor.success), -// content: Column( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Icon(Icons.bubble_chart), -// Text('Buttons') -// ], -// ), -// ), -// )), -// Expanded(child: GestureDetector( -// onTap: (){ -// Navigator.push( -// context, -// MaterialPageRoute( -// builder: (BuildContext context) => Avatars()), -// ); -// }, -// child: GFCard( -// color: getGFColor(GFColor.warning), -// content: Column( -// children: [ -// Icon(Icons.face), -// Text('Avatar') -// ], -// ), -// ), -// ),) -// ], -// ), -// ) - - body: - - Column( - children: [ - Row( + body: Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: ListView( children: [ - Expanded( - child: Container( - height: 100, - child: GestureDetector( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => Buttons()), - ); - }, - child: GFCard( - color: getGFColor(GFColor.success), - content: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Icon(Icons.bubble_chart, - color: getGFColor(GFColor.white)), - Text( - 'Buttons', - style: TextStyle(color: getGFColor(GFColor.white)), - ) - ], - ), - ), - ))), - Expanded( - child: Container( - height: 100, + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( child: GestureDetector( onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (BuildContext context) => Avatars()), + builder: (BuildContext context) => ButtonTypes()), ); }, - child: GFCard( - color: getGFColor(GFColor.success), - content: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + child: Container( + height: 160, + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Icon(Icons.face, color: getGFColor(GFColor.white)), + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/buttons.png'), Text( - 'Avatar', - style: TextStyle(color: getGFColor(GFColor.white)), + 'Buttons', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), ) ], ), ), - )), - ), - Expanded( - child: Container( - height: 100, + ), + ), + SizedBox( + width: 23, + ), + Expanded( child: GestureDetector( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => Toggles()), - ); - }, - child: GFCard( - color: getGFColor(GFColor.success), - content: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Icon(Icons.all_inclusive, - color: getGFColor(GFColor.white)), - Text( - 'Toggle', - style: TextStyle(color: getGFColor(GFColor.white)), - ) - ], - ), - ), - ))) - ], - ), - - Row( - children: [ - Expanded(child:Container( - height: 100, - child: GestureDetector( onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (BuildContext context) => Headers()), + builder: (BuildContext context) => Cards()), ); }, - child: GFCard( - color: getGFColor(GFColor.success), - content: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Icon(Icons.menu, - color: getGFColor(GFColor.white)), + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/card.png'), +// SvgPicture.asset('lib/assets/icons/buttons.svg', color: getGFColor(GFColor.success),), Text( - 'Header', - style: TextStyle(color: getGFColor(GFColor.white)), + 'Cards', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), ) ], ), ), - )) ), - Expanded(child:Container( - height: 100, - child: GestureDetector( + )) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( +// builder: (BuildContext context) => Buttons() + ), + ); + }, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/chips.png'), + Text( + 'Chips', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), + ) + ], + ), + ), + ), + ), + SizedBox( + width: 23, + ), + Expanded( + child: GestureDetector( onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (BuildContext context) => Toasts()), +// builder: (BuildContext context) => Buttons() + ), ); }, - child: GFCard( - color: getGFColor(GFColor.success), - content: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Icon(Icons.call_to_action, - color: getGFColor(GFColor.white)), + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/items.png'), +// SvgPicture.asset('lib/assets/icons/buttons.svg', color: getGFColor(GFColor.success),), Text( - 'Toast', - style: TextStyle(color: getGFColor(GFColor.white)), + 'Items', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), ) ], ), ), - )) ), - Expanded(child:Container( - height: 100, - child: GestureDetector( + )) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( +// builder: (BuildContext context) => Buttons() + ), + ); + }, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/lists.png'), + Text( + 'Lists', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), + ) + ], + ), + ), + ), + ), + SizedBox( + width: 23, + ), + Expanded( + child: GestureDetector( onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (BuildContext context) => Cards()), +// builder: (BuildContext context) => Buttons() + ), ); }, - child: GFCard( - color: getGFColor(GFColor.success), - content: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Icon(Icons.credit_card, - color: getGFColor(GFColor.white)), + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/menu.png'), +// SvgPicture.asset('lib/assets/icons/buttons.svg', color: getGFColor(GFColor.success),), Text( - 'Card', - style: TextStyle(color: getGFColor(GFColor.white)), + 'Menu', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), ) ], ), ), - )) ) - ], - ), - - Row( - children: [ - Expanded(child:Container( - height: 100, - child: GestureDetector( + )) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( +// builder: (BuildContext context) => Buttons() + ), + ); + }, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/slider.png'), + Text( + 'Sliders', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), + ) + ], + ), + ), + ), + ), + SizedBox( + width: 23, + ), + Expanded( + child: GestureDetector( onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (BuildContext context) => IconButtons()), +// builder: (BuildContext context) => Buttons() + ), ); }, - child: GFCard( - color: getGFColor(GFColor.success), - content: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Icon(Icons.insert_emoticon, - color: getGFColor(GFColor.white)), + Image.asset('lib/assets/icons/tabs.png'), +// SvgPicture.asset('lib/assets/icons/buttons.svg', color: getGFColor(GFColor.success),), Text( - 'Icon Button', - style: TextStyle(color: getGFColor(GFColor.white), fontSize: 12), + 'Tabs', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), ) ], ), ), - )) ), - Expanded(child:Container( - height: 100, - child: GestureDetector( + )) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( +// builder: (BuildContext context) => Buttons() + ), + ); + }, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/toast.png'), + Text( + 'Toasts', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), + ) + ], + ), + ), + ), + ), + SizedBox( + width: 23, + ), + Expanded( + child: GestureDetector( onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (BuildContext context) => ListTiles()), +// builder: (BuildContext context) => Buttons() + ), ); }, - child: GFCard( - color: getGFColor(GFColor.success), - content: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Icon(Icons.list, - color: getGFColor(GFColor.white)), + Image.asset('lib/assets/icons/toggle.png'), +// SvgPicture.asset('lib/assets/icons/buttons.svg', color: getGFColor(GFColor.success),), Text( - 'ListTile', - style: TextStyle(color: getGFColor(GFColor.white)), + 'Toggle', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), ) ], ), ), - )) ), - Expanded(child:Container( - height: 100, - child: GestureDetector( + )) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => Badges() + ), + ); + }, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/badge.png'), + Text( + 'Badges', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), + ) + ], + ), + ), + ), + ), + SizedBox( + width: 23, + ), + Expanded( + child: GestureDetector( onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (BuildContext context) => Badges()), +// builder: (BuildContext context) => Buttons() + ), ); }, - child: GFCard( - color: getGFColor(GFColor.success), - content: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Icon(Icons.apps, - color: getGFColor(GFColor.white)), + Image.asset('lib/assets/icons/avatar.png'), +// SvgPicture.asset('lib/assets/icons/buttons.svg', color: getGFColor(GFColor.success),), Text( - 'Badges', - style: TextStyle(color: getGFColor(GFColor.white)), + 'Avatars', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), ) ], ), ), - )) ) + )) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => Headers()), + ); + }, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/typo.png'), + Text( + 'Typography', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), + ) + ], + ), + ), + ), + ), + SizedBox( + width: 20, + ), + Expanded( + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( +// builder: (BuildContext context) => Headers() + ), + ); + }, + child: Container( + margin: EdgeInsets.only(top: 23), + decoration: BoxDecoration( +// color:getGFColor( GFColor.dark,), + color: Color(0xFF333333), + borderRadius: BorderRadius.all(Radius.circular(7)), + boxShadow: [ + new BoxShadow( + color: Colors.black.withOpacity(0.61), + blurRadius: 8.0, + spreadRadius: 0.0), + ]), + height: 160, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 10, + ), + Image.asset('lib/assets/icons/images.png'), + Text( + 'Images', + style: TextStyle( + fontSize: 20, + color: getGFColor( + GFColor.white, + )), + ) + ], + ), + ), + ), + ) + ], + ), + SizedBox( + height: 20, + ), ], - ) - ], - ), - ); + ), + )); } } diff --git a/demo_app/lib/screens/icon-button.dart b/demo_app/lib/screens/icon-button.dart index 0266d586..4a7d8738 100644 --- a/demo_app/lib/screens/icon-button.dart +++ b/demo_app/lib/screens/icon-button.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/button/gf_icon_button.dart'; import 'package:ui_kit/components/card/gf_card.dart'; -import 'package:ui_kit/components/header/gf_header.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; import 'package:ui_kit/types/gf_type.dart'; import 'package:ui_kit/size/gf_size.dart'; @@ -28,9 +28,9 @@ class _IconButtonsState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Solid Icon Button', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 15.0, @@ -100,9 +100,9 @@ class _IconButtonsState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Outline Icon Button', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 15.0, @@ -168,9 +168,9 @@ class _IconButtonsState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Transparent Icon Button', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 15.0, diff --git a/demo_app/lib/screens/list-tiles.dart b/demo_app/lib/screens/list-tiles.dart index bec715a6..7adc8f33 100644 --- a/demo_app/lib/screens/list-tiles.dart +++ b/demo_app/lib/screens/list-tiles.dart @@ -3,10 +3,10 @@ import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/avatar/gf_avatar.dart'; import 'package:ui_kit/components/button/gf_icon_button.dart'; import 'package:ui_kit/components/card/gf_card.dart'; -import 'package:ui_kit/components/header/gf_header.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; import 'package:ui_kit/components/list_tile/gf_list_tile.dart'; import 'package:ui_kit/shape/gf_avatar_shape.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; class ListTiles extends StatefulWidget { @override @@ -19,81 +19,89 @@ class _ListTilesState extends State { return Scaffold( appBar: AppBar( backgroundColor: getGFColor(GFColor.dark), - title: Text('List Tile', style: TextStyle(fontSize: 14),), + title: Text( + 'List Tile', + style: TextStyle(fontSize: 14), + ), ), body: ListView( children: [ - - GFCard( - content: GFListTile( - - title: GFHeader( + content: GFListTile( + title: GFTypography( text: 'List tile', - type: GFHeadingType.typo5, + type: GFTypographyType.typo5, showDivider: false, ), - subTitle: Text('Lorem ipsum', style: TextStyle(color: getGFColor(GFColor.dark)),), - + subTitle: Text( + 'Lorem ipsum', + style: TextStyle(color: getGFColor(GFColor.dark)), + ), showDivider: false, - ), ), - GFCard( - content: GFListTile( - avatar: GFAvatar( - shape: GFAvatarShape.standard, - ), - title: GFHeader( - text: 'List tile', - type: GFHeadingType.typo5, - showDivider: false, - ), - subTitle: Text('Lorem ipsum', style: TextStyle(color: getGFColor(GFColor.dark)),), - - description: Text('Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ', - style: TextStyle(fontSize: 13, color: getGFColor(GFColor.secondary))), - showDivider: false, - ), - ), - - GFCard( - content: GFListTile( - - title: GFHeader( - text: 'List tile', - type: GFHeadingType.typo5, - showDivider: false, - ), - subTitle: Text('Lorem ipsum', style: TextStyle(color: getGFColor(GFColor.dark)),), - - description: Text('Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ', - style: TextStyle(fontSize: 13, color: getGFColor(GFColor.secondary))), - icon: GFAvatar( - shape: GFAvatarShape.circle, - ), - showDivider: false, - - ), - ), - GFCard( - content: GFListTile( - avatar: GFAvatar( - shape: GFAvatarShape.square, - ), - title: GFHeader( + content: GFListTile( + avatar: GFAvatar( + shape: GFAvatarShape.standard, + ), + title: GFTypography( text: 'List tile', - type: GFHeadingType.typo5, + type: GFTypographyType.typo5, showDivider: false, ), - subTitle: Text('Lorem ipsum', style: TextStyle(color: getGFColor(GFColor.dark)),), - - description: Text('Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ', - style: TextStyle(fontSize: 13, color: getGFColor(GFColor.secondary))), + subTitle: Text( + 'Lorem ipsum', + style: TextStyle(color: getGFColor(GFColor.dark)), + ), + description: Text( + 'Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ', + style: TextStyle( + fontSize: 13, color: getGFColor(GFColor.secondary))), + showDivider: false, + ), + ), + GFCard( + content: GFListTile( + title: GFTypography( + text: 'List tile', + type: GFTypographyType.typo5, + showDivider: false, + ), + subTitle: Text( + 'Lorem ipsum', + style: TextStyle(color: getGFColor(GFColor.dark)), + ), + description: Text( + 'Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ', + style: TextStyle( + fontSize: 13, color: getGFColor(GFColor.secondary))), + icon: GFAvatar( + shape: GFAvatarShape.circle, + ), + showDivider: false, + ), + ), + GFCard( + content: GFListTile( + avatar: GFAvatar( + shape: GFAvatarShape.square, + ), + title: GFTypography( + text: 'List tile', + type: GFTypographyType.typo5, + showDivider: false, + ), + subTitle: Text( + 'Lorem ipsum', + style: TextStyle(color: getGFColor(GFColor.dark)), + ), + description: Text( + 'Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ', + style: TextStyle( + fontSize: 13, color: getGFColor(GFColor.secondary))), icon: GFIconButton(icon: Icon(Icons.share), onPressed: null), showDivider: false, - ), ) ], diff --git a/demo_app/lib/screens/toasts.dart b/demo_app/lib/screens/toasts.dart index 3ec68dfd..8b02503a 100644 --- a/demo_app/lib/screens/toasts.dart +++ b/demo_app/lib/screens/toasts.dart @@ -2,9 +2,9 @@ import 'package:flutter/material.dart'; import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/button/gf_button.dart'; import 'package:ui_kit/components/card/gf_card.dart'; -import 'package:ui_kit/components/header/gf_header.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; import 'package:ui_kit/components/toast/gf_toast.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; import 'package:ui_kit/types/gf_type.dart'; class Toasts extends StatefulWidget { @@ -29,9 +29,9 @@ class _ToastsState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Toast', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, diff --git a/demo_app/lib/screens/toggles.dart b/demo_app/lib/screens/toggles.dart index 9199a3e5..691795dd 100644 --- a/demo_app/lib/screens/toggles.dart +++ b/demo_app/lib/screens/toggles.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; import 'package:ui_kit/components/card/gf_card.dart'; -import 'package:ui_kit/components/header/gf_header.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; import 'package:ui_kit/components/toggle/gf_toggle.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; import 'package:ui_kit/types/gf_toggle_type.dart'; import 'package:ui_kit/colors/gf_color.dart'; @@ -27,9 +27,9 @@ class _TogglesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Android', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -43,9 +43,9 @@ class _TogglesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'IOS', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -59,9 +59,9 @@ class _TogglesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Square', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, @@ -75,9 +75,9 @@ class _TogglesState extends State { GFCard( content: Column( children: [ - GFHeader( + GFTypography( text: 'Custom', - type: GFHeadingType.typo6, + type: GFTypographyType.typo6, ), SizedBox( height: 10, diff --git a/demo_app/pubspec.lock b/demo_app/pubspec.lock index 57c5df30..91263cf1 100644 --- a/demo_app/pubspec.lock +++ b/demo_app/pubspec.lock @@ -69,6 +69,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "0.15.0" flutter_test: dependency: "direct dev" description: flutter @@ -102,6 +109,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.6.4" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" pedantic: dependency: transitive description: @@ -200,3 +221,4 @@ packages: version: "3.5.0" sdks: dart: ">=2.4.0 <3.0.0" + flutter: ">=1.5.9-pre.94 <2.0.0" diff --git a/demo_app/pubspec.yaml b/demo_app/pubspec.yaml index 47d0c1f5..95424a34 100644 --- a/demo_app/pubspec.yaml +++ b/demo_app/pubspec.yaml @@ -1,16 +1,5 @@ name: demo_app description: A new Flutter project. - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html version: 1.0.0+1 environment: @@ -23,6 +12,7 @@ dependencies: path: ../ cupertino_icons: ^0.1.2 + flutter_svg: ^0.15.0 dev_dependencies: flutter_test: @@ -30,3 +20,43 @@ dev_dependencies: flutter: uses-material-design: true + + assets: + - lib/assets/logo/logo.png + - lib/assets/icons/buttons.png + - lib/assets/icons/buttons.svg + - lib/assets/icons/avatar.png + - lib/assets/icons/badge.png + - lib/assets/icons/card.png + - lib/assets/icons/chips.png + - lib/assets/icons/items.png + - lib/assets/icons/lists.png + - lib/assets/icons/menu.png + - lib/assets/icons/slider.png + - lib/assets/icons/tabs.png + - lib/assets/icons/toast.png + - lib/assets/icons/toggle.png + - lib/assets/icons/typo.png + - lib/assets/icons/images.png + - lib/assets/icons/back.png + - lib/assets/icons/next.png + - lib/assets/icons/primary.svg + - lib/assets/icons/secondary.svg + - lib/assets/icons/success.svg + - lib/assets/icons/warning.svg + - lib/assets/icons/danger.svg + - lib/assets/icons/info.svg + - lib/assets/icons/dark.svg + - lib/assets/icons/link.svg + - lib/assets/icons/light.svg + - lib/assets/icons/fb.svg + - lib/assets/icons/twitter.svg + - lib/assets/icons/whatsapp.svg + - lib/assets/icons/google.svg + - lib/assets/icons/dribble.svg + - lib/assets/icons/youtube.svg + - lib/assets/icons/slack.svg + - lib/assets/icons/pinterest.svg + - lib/assets/icons/linkedin.svg + + diff --git a/demo_app/test/widget_test.dart b/demo_app/test/widget_test.dart index 5f343444..98c3ecc4 100644 --- a/demo_app/test/widget_test.dart +++ b/demo_app/test/widget_test.dart @@ -5,26 +5,26 @@ // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:demo_app/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} +//import 'package:flutter/material.dart'; +//import 'package:flutter_test/flutter_test.dart'; +// +//import 'package:demo_app/main.dart'; +// +//void main() { +// testWidgets('Counter increments smoke test', (WidgetTester tester) async { +// // Build our app and trigger a frame. +// await tester.pumpWidget(MyApp()); +// +// // Verify that our counter starts at 0. +// expect(find.text('0'), findsOneWidget); +// expect(find.text('1'), findsNothing); +// +// // Tap the '+' icon and trigger a frame. +// await tester.tap(find.byIcon(Icons.add)); +// await tester.pump(); +// +// // Verify that our counter has incremented. +// expect(find.text('0'), findsNothing); +// expect(find.text('1'), findsOneWidget); +// }); +//} diff --git a/example/lib/main.dart b/example/lib/main.dart index 8fbfffc7..d79cb9f1 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,9 +1,12 @@ import 'package:flutter/material.dart'; +import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/button/gf_button.dart'; import 'package:ui_kit/components/badge/gf_button_badge.dart'; import 'package:ui_kit/components/avatar/gf_avatar.dart'; import 'package:ui_kit/components/badge/gf_badge.dart'; -import 'package:ui_kit/components/segment_tabs/gf_segment_tabs.dart'; +import 'package:ui_kit/components/list/gf_list.dart'; +import 'package:ui_kit/components/tabs/gf_segment_tabs.dart'; +import 'package:ui_kit/size/gf_size.dart'; import 'package:ui_kit/types/gf_type.dart'; import 'package:ui_kit/shape/gf_button_shape.dart'; import 'package:ui_kit/shape/gf_badge_shape.dart'; @@ -14,6 +17,21 @@ import 'package:ui_kit/components/drawer/gf_drawer_header.dart'; import 'package:ui_kit/components/toast/gf_toast.dart'; import 'package:ui_kit/components/appbar/gf_appbar.dart'; import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; +import 'package:ui_kit/components/button/gf_icon_button.dart'; +import 'package:ui_kit/components/button/gf_social_button.dart'; +import 'package:ui_kit/components/carousel/gf_carousel.dart'; +import 'package:ui_kit/components/carousel/gf_items_carousel.dart'; +import 'package:ui_kit/shape/gf_avatar_shape.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/components/image/gf_image_overlay.dart'; +import 'package:ui_kit/components/list_tile/gf_list_tile.dart'; +import 'package:ui_kit/position/gf_position.dart'; +import 'package:ui_kit/components/button/gf_button_bar.dart'; +import 'package:ui_kit/components/badge/gf_icon_badge.dart'; +import 'package:ui_kit/shape/gf_icon_button_shape.dart'; +import 'package:ui_kit/components/tabs/gf_tabBar.dart'; +import 'package:ui_kit/components/typography/gf_typography.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; final List imageList = [ "https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg", @@ -70,98 +88,102 @@ class _MyHomePageState extends State @override Widget build(BuildContext context) { return Scaffold( - drawer: GFDrawer( - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.6), BlendMode.darken), - backgroundImage: NetworkImage( - "https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg"), - gradient: LinearGradient( - begin: Alignment.topRight, - end: Alignment.bottomLeft, - stops: [0.1, 0.5, 0.7, 0.9], - colors: [ - Colors.teal[800], - Colors.teal[600], - Colors.teal[400], - Colors.teal[200], - ], - ), - child: ListView( - padding: EdgeInsets.zero, - children: [ - GFDrawerHeader( - currentAccountPicture: GFAvatar( - radius: 80.0, - backgroundImage: NetworkImage( - "https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg"), - ), - decoration: BoxDecoration( - color: Colors.teal.withOpacity(0.45), - ), - otherAccountsPictures: [ - Image( - image: NetworkImage( - "https://cdn.pixabay.com/photo/2019/12/20/00/03/road-4707345_960_720.jpg"), - fit: BoxFit.cover, - ), - GFAvatar( - child: Text("dcf"), - ) - ], - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('user'), - Text('user@asdf.com'), - ], - ), - ), - ListTile( - title: Text('Item 1'), - onTap: () { - Navigator.pop(context); - }, - ), - ListTile( - title: Text('Item 2'), - onTap: () {}, - ), - ], - ), - ), +// drawer: GFDrawer( +// colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.6), BlendMode.darken), +// backgroundImage: NetworkImage("https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg"), +// gradient: LinearGradient( +// begin: Alignment.topRight, +// end: Alignment.bottomLeft, +// stops: [0.1, 0.5, 0.7, 0.9], +// colors: [ +// Colors.teal[800], +// Colors.teal[600], +// Colors.teal[400], +// Colors.teal[200], +// ], +// ), +// child: ListView( +// padding: EdgeInsets.zero, +// children: [ +// GFDrawerHeader( +// currentAccountPicture: GFAvatar( +// radius: 80.0, +// backgroundImage: NetworkImage("https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg"), +// ), +// +// decoration: BoxDecoration( +// color: Colors.teal.withOpacity(0.45), +// ), +// otherAccountsPictures: [ +// Image( +// image: NetworkImage("https://cdn.pixabay.com/photo/2019/12/20/00/03/road-4707345_960_720.jpg"), +// fit: BoxFit.cover, +// ), +// GFAvatar( +// child: Text("dcf"), +// ) +// ], +// child: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text('user'), +// Text('user@asdf.com'), +// ], +// ), +// ), +// ListTile( +// title: Text('Item 1'), +// onTap: () { +// Navigator.pop(context); +// }, +// ), +// ListTile( +// title: Text('Item 2'), +// onTap: () { +// }, +// ), +// ], +// ), +// ), appBar: GFAppBar( -// backgroundColor: Colors.tealAccent, + backgroundColor: Colors.tealAccent, centerTitle: true, - title: GFSegmentTabs( - initialIndex: 0, - length: 3, - tabs: [ - Tab( - child: Text( - "Gelatin", - ), - ), - Tab( - child: Text( - "Donuts", - ), - ), - Tab( - child: Text( - "Pastry", - ), - ), - ], - ), + title: Text("UI KIT"), +// GFSegmentTabs( +// tabController: tabController, +// initialIndex: 0, +// length: 3, +// tabs: [ +// Tab( +// child: Text( +// "cream", +// ), +// ), +// Tab( +// child: Text( +// "serum", +// ), +// ), +// Tab( +// child: Text( +// "toner", +// ), +// ), +// ], +//// borderRadius: BorderRadius.circular(50.0), +// ), // trailing: [ // GFIconButton(icon: Icon(Icons.directions_bus), onPressed: null) // ], ), - backgroundColor: Colors.teal, +// backgroundColor: Colors.teal, body: -// GFTabBarView(controller: tabController, children: [ -// Container(color: Colors.red), +// GFTabBarView( +// height: 200.0, +// controller: tabController, +// children: [ +// Container(color: Colors.red,), // Container(color: Colors.green), // Container(color: Colors.blue) // ]), @@ -170,22 +192,330 @@ class _MyHomePageState extends State mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - GFAvatar( - radius: 80.0, - backgroundImage: NetworkImage( - "https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg"), + GFCard( + content: Column( + children: [ + GFTypography( + text: 'GF Header Typo1', + type: GFTypographyType.typo1, + showDivider: false, + ), + GFTypography( + text: 'GF Header Typo2', + type: GFTypographyType.typo2, + showDivider: false, + ), + GFTypography( + text: 'GF Header Typo3', + type: GFTypographyType.typo3, + showDivider: false, + ), + GFTypography( + text: 'GF Header Typo4', + type: GFTypographyType.typo4, + showDivider: false, + ), + GFTypography( + text: 'GF Header Typo5', + type: GFTypographyType.typo5, + showDivider: false, + ), + GFTypography( + text: 'GF Header Typo6', + type: GFTypographyType.typo6, + showDivider: false, + ), + ], + ), + ), + + GFCard( + content: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GFTypography( + text: 'GF Header Typo1', + type: GFTypographyType.typo1, + backgroundImage: NetworkImage( + 'https://cdn.pixabay.com/photo/2019/12/25/16/49/happy-new-year-4718894_960_720.png'), + ), + SizedBox( + height: 40, + ), + GFTypography( + icon: GFAvatar(), + text: 'GF Header Typo2', + type: GFTypographyType.typo2, + dividerColor: GFColor.primary, + dividerAlignment: Alignment.center, + ), + SizedBox( + height: 40, + ), + GFTypography( + icon: Icon(Icons.insert_emoticon), + text: 'GF Header Typo3', + type: GFTypographyType.typo3, + dividerWidth: 150, + dividerColor: GFColor.warning, + dividerBorderRadius: BorderRadius.all(Radius.circular(0)), + ), + SizedBox( + height: 40, + ), + GFTypography( + text: 'GF Header Typo4', + type: GFTypographyType.typo4, + dividerWidth: 345, + icon: Image.network( + 'https://cdn.pixabay.com/photo/2016/12/15/03/27/cocoa-1908020_960_720.jpg', + width: 50, + )), + SizedBox( + height: 40, + ), + GFTypography( + text: 'GF Header Typo5', + type: GFTypographyType.typo5, + dividerColor: GFColor.alt, + ), + SizedBox( + height: 40, + ), + GFTypography( + text: 'GF Header Typo6', + type: GFTypographyType.typo6, + dividerWidth: 20, + ), + ], + )), + +// GFButton( +// onPressed: (){}, +// text: "whatsapp", +// icon: Icon(Icons.directions_bike), +// ), +// +// GFButton( +// text: "linkedin", +// icon: Icon(Icons.directions_bike), +// ), + + GFListTile( +// padding: EdgeInsets.all(8.0), +// color: Colors.redAccent, +// avatar: GFAvatar( +// child: Text("tb"), +// ), + title: Text('title'), +// subTitle: Text('subtitle'), + icon: Text("99"), +// dividerColor: Colors.blue, +// dividerEndIndent: 20.0, +// dividerHeight: 2.0, +// dividerIndent: 30.0, +// dividerThickness: 5.0, +// showDivider: false, ), + GFListTile( + avatar: GFAvatar( + shape: GFAvatarShape.standard, + ), + title: GFTypography( + text: 'List tile', + type: GFTypographyType.typo5, + showDivider: false, + ), + subTitle: Text( + 'Lorem ipsum', + style: TextStyle(color: getGFColor(GFColor.dark)), + ), + description: Text( + 'Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ' + 'sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ', + style: TextStyle( + fontSize: 13, color: getGFColor(GFColor.secondary))), + showDivider: true, + icon: GFIconButton( + onPressed: null, + type: GFType.transparent, + icon: Icon(Icons.favorite_border), + ), + ), + + GFCard( + content: GFListTile( + avatar: GFAvatar( + shape: GFAvatarShape.standard, + ), + title: GFTypography( + text: 'List tile', + type: GFTypographyType.typo5, + showDivider: false, + ), + subTitle: Text( + 'Lorem ipsum', + style: TextStyle(color: getGFColor(GFColor.dark)), + ), + description: Text( + 'Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ', + style: TextStyle( + fontSize: 13, color: getGFColor(GFColor.secondary))), + showDivider: false, + ), + ), + + GFCard( + content: GFImageOverlay( + height: 200.0, + width: MediaQuery.of(context).size.width, + child: Text("Dcs"), +// color: color ?? cardTheme.color ?? Theme.of(context).cardColor, + image: AssetImage("lib/assets/food.jpeg"), + boxFit: BoxFit.fill, + colorFilter: new ColorFilter.mode( + Colors.black.withOpacity(0.67), BlendMode.darken), +// border: border, +// borderRadius: borderRadius ?? BorderRadius.all(Radius.circular(4.0)), + ), + ), + + GFCard( + content: Container( + width: 190.0, + height: 190.0, + decoration: new BoxDecoration( + shape: BoxShape.circle, + image: new DecorationImage( + fit: BoxFit.fill, + image: AssetImage( + "lib/assets/food.jpeg", + ), + ))), + ), + + GFButtonBadge( + onPressed: () {}, +// position: GFPosition.end, +// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), + text: 'goodiesdxs', +// color: GFColor.success, +// shape: GFButtonShape.pills, +// type: GFType.outline2x, +// size: GFSize.small, + icon: GFBadge( + child: Text("12"), +// color: GFColor.dark, +// shape: GFBadgeShape.circle, +// size: GFSize.small, +// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +// textColor: GFColor.white, +// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), + ), + ), + +// GFSocialButton( +// text: 'social goodies', +// onPressed: (){}, +//// icon: GFBadge( +//// child: Text("12"), +//// color: GFColor.dark, +////// shape: GFBadgeShape.circle, +////// size: GFSize.small, +////// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +////// textColor: GFColor.white, +////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +//// ), +// type: GFType.outline2x, +// shape: GFButtonShape.pills, +//// blockButton: true, +// fullWidthButton: true, +// +// ), +// +// GFButton( +//// icon: GFBadge( +//// child: Text("12"), +//// color: GFColor.dark, +////// shape: GFBadgeShape.circle, +////// size: GFSize.small, +////// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +////// textColor: GFColor.white, +////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +//// ), +// text: 'goodies', +// onPressed: (){}, +//// textColor: GFColor.danger, +//// icon: Icon(Icons.access_alarms), +//// hoverColor: GFColor.dark, +// color: GFColor.secondary, +//// focusColor: GFColor.danger, +// type: GFType.solid, +// shape: GFButtonShape.pills, +// buttonBoxShadow: true, +//// boxShadow: BoxShadow( +//// color: Colors.pink, +//// blurRadius: 2.0, +//// spreadRadius: 1.0, +//// offset: Offset.zero, +//// ), +//// splashColor: GFColor.warning, +//// highlightColor: GFColor.alt, +//// size: GFSize.large, +//// disabledColor: GFColor.dark, +//// disabledTextColor: GFColor.light, +// blockButton: true, +//// fullWidthButton: true, +//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +// ), +// +// GFIconButton( +// onPressed: null, +// icon: Icon(Icons.ac_unit,), +//// iconSize: 12.0, +// type: GFType.solid, +//// shape: GFButtonShape.pills, +//// size: GFSize.large, +// buttonBoxShadow: true, +// color: GFColor.secondary, +//// boxShadow: BoxShadow( +//// color: Colors.pink, +//// blurRadius: 2.0, +//// spreadRadius: 1.0, +//// offset: Offset.zero, +//// ), +//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +// ), +// +// RaisedButton( +// child: Text('goodiesMaterialButton button '), +// onPressed: (){}, +//// color: Colors.blueGrey, +//// hoverColor: Colors.blueGrey, +//// focusColor: Colors.teal, +//// splashColor: Colors.amber, +//// highlightColor: Colors.cyan, +// ), +// +// GFAvatar( +// radius: 80.0, +// backgroundImage: NetworkImage("https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg"), +// ), +// GFSegmentTabs( + tabController: tabController, // height: 38.0, // width: 180.0, initialIndex: 0, length: 3, tabs: [ - Tab( - child: Text( - "Gelatin", - ), + Text( + "Gelatin", ), Tab( child: Text( @@ -211,8 +541,18 @@ class _MyHomePageState extends State // border: Border.all(color: Colors.orange, width: 2.0), // borderRadius: BorderRadius.circular(50.0) ), - -// GFItemsSlider( +// +// GFTabBarView( +// controller: tabController, +// height: 400.0, +// children: [ +// Container(color: Colors.red), +// Container(color: Colors.green), +// Container(color: Colors.blue) +// ] +// ), +// +// GFItemsCarousel( // rowCount: 3, // children: imageList.map( // (url) { @@ -230,17 +570,16 @@ class _MyHomePageState extends State // }, // ).toList(), // ), - -// GFSlider( -// rowCount: 3, -// pagerSize: 12.0, -// activeIndicator: Colors.pink, -// passiveIndicator: Colors.pink.withOpacity(0.4), -// viewportFraction: 1.0, -// aspectRatio: 2.0, -// autoPlay: true, -// enlargeMainPage: true, -// pagination: true, +// +// GFCarousel( +//// pagerSize: 12.0, +//// activeIndicator: Colors.pink, +//// passiveIndicator: Colors.pink.withOpacity(0.4), +//// viewportFraction: 1.0, +//// aspectRatio: 2.0, +//// autoPlay: true, +//// enlargeMainPage: true, +//// pagination: true, // items: imageList.map( // (url) { // return Container( @@ -262,103 +601,90 @@ class _MyHomePageState extends State // }); // }, // ), - - GFButton( -// color: Colors.green, - onPressed: null, - child: Text("share"), - type: GFType.outline, - shape: GFButtonShape.pills, -//textColor: GFColor.danger, -//borderSide: BorderSide(color: Colors.pink, width: 2.0), -// buttonBoxShadow: true, -// boxShadow: BoxShadow( -// color: Colors.pink, -// blurRadius: 1.5, -// spreadRadius: 2.0, -// offset: Offset.zero, +// +// +// GFTabs( +//// height: 100.0, +//// tabBarHeight: 52.0, +// initialIndex: 0, +// length: 3, +// tabs: [ +// GFButton( +// onPressed: null, +// child: Text("share"), +// icon: Icon(Icons.share), +// buttonBoxShadow: true, // ), - ), - - GFTabs( - initialIndex: 0, - length: 3, - tabs: [ - GFButton( - onPressed: null, - child: Text("share"), - icon: Icon(Icons.share), - buttonBoxShadow: true, - ), - Tab( - icon: Icon(Icons.error), - child: Text( - "Orders", - ), - ), - Tab( - child: Text( - "Pastry", - ), - ), - ], - tabBarView: GFTabBarView( - children: [ - Container( - color: Colors.red, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - GFToast( - child: Text("sdc"), - backgroundColor: Colors.pink, - button: GFButton( - text: 'dsx', - onPressed: () { - print("fdsc"); - }, - ), - ), - RawMaterialButton( - onPressed: null, - child: Text("fv"), - ), - FlatButton(onPressed: null, child: Text("cds")), - Icon(Icons.directions_railway), - GFButton( - onPressed: null, - child: Text("share"), - icon: Icon(Icons.share), - shape: GFButtonShape.pills, - type: GFType.transparent, - ), - ], - ), - ), - Icon(Icons.directions_car), - Icon(Icons.directions_transit), - ], - ), - indicatorColor: Colors.teal, -// indicatorSize: TabBarIndicatorSize.label, -// labelColor: Colors.lightGreen, -// unselectedLabelColor: Colors.black, -// labelStyle: TextStyle( -// fontWeight: FontWeight.w500, -// fontSize: 13.0, -// color: Colors.deepOrange, -// fontFamily: 'OpenSansBold', -// ), -// unselectedLabelStyle: TextStyle( -// fontWeight: FontWeight.w500, -// fontSize: 13.0, -// color: Colors.black, -// fontFamily: 'OpenSansBold', +// Tab( +// icon: Icon(Icons.error), +// child: Text( +// "Orders", +// ), +// ), +// Tab( +// child: Text( +// "Pastry", +// ), +// ), +// ], +// tabBarView: GFTabBarView( +// children: [ +// Container( +// color: Colors.red, +// child: Column( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// +// GFToast( +// child: Text("sdc"), +// backgroundColor: Colors.pink, +// button: GFButton( +// text: 'dsx', +// onPressed: (){ +// print("fdsc"); +// }, +// ), +// ), +// RawMaterialButton( +// onPressed: null, +// child: Text("fv"), +// ), +// FlatButton(onPressed: null, child: Text("cds")), +// Icon(Icons.directions_railway), +// GFButton( +// onPressed: null, +// child: Text("share"), +// icon: Icon(Icons.share), +// shape: GFButtonShape.pills, +// type: GFType.transparent, +// ), +// ], +// ), +// ), +// Icon(Icons.directions_car), +// Icon(Icons.directions_transit), +// ], // ), - ), +//// indicatorColor: Colors.teal, +//// indicatorSize: TabBarIndicatorSize.label, +//// labelColor: Colors.lightGreen, +//// unselectedLabelColor: Colors.black, +//// labelStyle: TextStyle( +//// fontWeight: FontWeight.w500, +//// fontSize: 13.0, +//// color: Colors.deepOrange, +//// fontFamily: 'OpenSansBold', +//// ), +//// unselectedLabelStyle: TextStyle( +//// fontWeight: FontWeight.w500, +//// fontSize: 13.0, +//// color: Colors.black, +//// fontFamily: 'OpenSansBold', +//// ), +// ), // -// GFSlider( +// GFCarousel( // autoPlay: true, // viewportFraction: 1.0, // aspectRatio: MediaQuery.of(context).size.aspectRatio, @@ -384,11 +710,10 @@ class _MyHomePageState extends State // }, // ), // GFCard( -// boxFit: BoxFit.cover, -// colorFilter: new ColorFilter.mode( -// Colors.black.withOpacity(0.67), BlendMode.darken), -// image: Image.asset("lib/assets/food.jpeg"), -//// imageOverlay: AssetImage("lib/assets/food.jpeg"), +// boxFit: BoxFit.fill, +// colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.67), BlendMode.darken), +//// image: Image.asset("lib/assets/food.jpeg",), +// imageOverlay: AssetImage("lib/assets/food.jpeg"), // titlePosition: GFPosition.end, // title: GFListTile( // avatar: GFAvatar( @@ -409,10 +734,8 @@ class _MyHomePageState extends State // ), // ), // content: Text( -// "Flutter " -// "Flutter is Google's mobile UI framework for crafting" -// " high-quality native interfaces on iOS and Android in " -// "Flutter ", +// "Flutter Flutter is Google's mobile UI framework for crafting" +// "Flutter Flutter is Google's mobile UI framework for crafting", // style: TextStyle(color: Colors.grey), // ), // buttonBar: GFButtonBar( @@ -519,6 +842,30 @@ class _MyHomePageState extends State // 'Hello world', // style: TextStyle(color: Colors.white), // ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), // ], // ), //// color: Colors.orange, @@ -529,35 +876,40 @@ class _MyHomePageState extends State // borderRadius: new BorderRadius.circular(5.0), //// border: Border.all(color: Colors.pink, width: 2.0), // ), -// GFAvatar( -// // radius: 20.0, -//// maxRadius: 50, + GFAvatar( + // radius: 20.0, +// maxRadius: 50, + + child: Text("de"), + +// backgroundColor: Colors.pink, // -// child: Text("de"), +//// backgroundImage: , // -//// backgroundColor: Colors.pink, -//// -////// backgroundImage: , -//// -//// foregroundColor: Colors.deepOrangeAccent, -//// -// shape: GFAvatarShape.standard, -//// -//// size: GFSize.medium, -//// -//// borderRadius: BorderRadius.circular(20.0), -// ), - // GFIconBadges( - // onPressed: null, - // child: GFIconButton( - // onPressed: null, - // icon: Icon(Icons.ac_unit), - // ), - // counterChild: GFBadge( - // text: '12', +// foregroundColor: Colors.deepOrangeAccent, +// +// shape: GFAvatarShape.circle, +// +// size: GFSize.medium, +// +// borderRadius: BorderRadius.circular(20.0), + ), + GFIconBadge( + child: +// GFIconButton( +// onPressed: null, +// icon: Icon(Icons.ac_unit), +// size: GFSize.large, +// ), + GFAvatar( + child: Text("sefv"), + size: GFSize.small, + ), + counterChild: GFBadge( + text: '12', -// color: GFColor.dark -////, +// color: GFColor.dark, +// // shape: GFBadgeShape.circle, // // size: GFSize.small, @@ -569,46 +921,27 @@ class _MyHomePageState extends State // textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), // // borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.orange, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), - // ), - // ), -// GFIconButton( -// onPressed: null, -// icon: Icon(Icons.ac_unit), -//// iconSize: 12.0, + ), + ), + GFIconButton( + onPressed: null, + icon: Icon(Icons.ac_unit), +// iconSize: 12.0, // type: GFType.solid, -// shape: GFButtonShape.pills, +// shape: GFIconButtonShape.pills, // size: GFSize.large, -//// buttonBoxShadow: true, -//// color: GFColor.primary, -//// boxShadow: BoxShadow( -//// color: Colors.pink, -//// blurRadius: 2.0, -//// spreadRadius: 1.0, -//// offset: Offset.zero, -//// ), -//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), -// ), - GFButtonBadge( - onPressed: null, -// position: GFIconPosition.start, +// buttonBoxShadow: true, +// color: GFColor.warning, +// boxShadow: BoxShadow( +// color: Colors.pink, +// blurRadius: 2.0, +// spreadRadius: 1.0, +// offset: Offset.zero, +// ), // borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), // borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), - text: 'goodies', -// color: GFColor.danger, -// shape: GFButtonShape.pills, - type: GFType.outline, -// size: GFSize.small, - counterChild: GFBadge( - child: Text("12"), -// color: GFColor.dark, - shape: GFBadgeShape.circle, -// size: GFSize.small, -// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -// textColor: GFColor.white, -// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), - ), ), +// // GFBadge( // text: '12', //// color: GFColor.dark, @@ -618,16 +951,16 @@ class _MyHomePageState extends State //// textColor: GFColor.white, //// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), // ), -// GFButton( -// text: 'goodies', -// onPressed: () {}, -// icon: Icon(Icons.access_alarms), -// ), +// // GFButton( // type: GFType.solid, // shape: GFButtonShape.pills, // text: 'goodies', -// onPressed: () {}, +// onPressed: () { +// print('dddddddddd'); +// }, +// hoverColor: Colors.orange, +// focusColor: Colors.teal, //// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), //// size: GFSize.large, //// buttonBoxShadow: true, @@ -649,6 +982,30 @@ class _MyHomePageState extends State ], ), ), + bottomNavigationBar: GFTabBar( + initialIndex: 0, + length: 3, + controller: tabController, + tabs: [ + GFButton( + onPressed: null, + child: Text("share"), + icon: Icon(Icons.share), + buttonBoxShadow: true, + ), + Tab( + icon: Icon(Icons.error), + child: Text( + "Orders", + ), + ), + Tab( + child: Text( + "Pastry", + ), + ), + ], + ), ); } } diff --git a/gf_web/.gitignore b/gf_web/.gitignore new file mode 100644 index 00000000..ae1f1838 --- /dev/null +++ b/gf_web/.gitignore @@ -0,0 +1,37 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Exceptions to above rules. +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/gf_web/.metadata b/gf_web/.metadata new file mode 100644 index 00000000..361e1e4c --- /dev/null +++ b/gf_web/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 18cd7a3601bcffb36fdf2f679f763b5e827c2e8e + channel: beta + +project_type: app diff --git a/gf_web/README.md b/gf_web/README.md new file mode 100644 index 00000000..f4f9b0c6 --- /dev/null +++ b/gf_web/README.md @@ -0,0 +1,16 @@ +# gf_web + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/gf_web/android/.gitignore b/gf_web/android/.gitignore new file mode 100644 index 00000000..bc2100d8 --- /dev/null +++ b/gf_web/android/.gitignore @@ -0,0 +1,7 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java diff --git a/gf_web/android/app/build.gradle b/gf_web/android/app/build.gradle new file mode 100644 index 00000000..0c927f7f --- /dev/null +++ b/gf_web/android/app/build.gradle @@ -0,0 +1,67 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 28 + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.gf_web" + minSdkVersion 16 + targetSdkVersion 28 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test:runner:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' +} diff --git a/gf_web/android/app/src/debug/AndroidManifest.xml b/gf_web/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..56702152 --- /dev/null +++ b/gf_web/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/gf_web/android/app/src/main/AndroidManifest.xml b/gf_web/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..048a3923 --- /dev/null +++ b/gf_web/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + diff --git a/gf_web/android/app/src/main/kotlin/com/example/gf_web/MainActivity.kt b/gf_web/android/app/src/main/kotlin/com/example/gf_web/MainActivity.kt new file mode 100644 index 00000000..2735dc9f --- /dev/null +++ b/gf_web/android/app/src/main/kotlin/com/example/gf_web/MainActivity.kt @@ -0,0 +1,12 @@ +package com.example.gf_web + +import androidx.annotation.NonNull; +import io.flutter.embedding.android.FlutterActivity +import io.flutter.embedding.engine.FlutterEngine +import io.flutter.plugins.GeneratedPluginRegistrant + +class MainActivity: FlutterActivity() { + override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { + GeneratedPluginRegistrant.registerWith(flutterEngine); + } +} diff --git a/gf_web/android/app/src/main/res/drawable/launch_background.xml b/gf_web/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/gf_web/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/gf_web/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/gf_web/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..db77bb4b Binary files /dev/null and b/gf_web/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/gf_web/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/gf_web/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..17987b79 Binary files /dev/null and b/gf_web/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/gf_web/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/gf_web/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..09d43914 Binary files /dev/null and b/gf_web/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/gf_web/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/gf_web/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..d5f1c8d3 Binary files /dev/null and b/gf_web/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/gf_web/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/gf_web/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..4d6372ee Binary files /dev/null and b/gf_web/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/gf_web/android/app/src/main/res/values/styles.xml b/gf_web/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..00fa4417 --- /dev/null +++ b/gf_web/android/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + diff --git a/gf_web/android/app/src/profile/AndroidManifest.xml b/gf_web/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..56702152 --- /dev/null +++ b/gf_web/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/gf_web/android/build.gradle b/gf_web/android/build.gradle new file mode 100644 index 00000000..3100ad2d --- /dev/null +++ b/gf_web/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.5.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/gf_web/android/gradle.properties b/gf_web/android/gradle.properties new file mode 100644 index 00000000..38c8d454 --- /dev/null +++ b/gf_web/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +android.enableR8=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/gf_web/android/gradle/wrapper/gradle-wrapper.properties b/gf_web/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..296b146b --- /dev/null +++ b/gf_web/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/gf_web/android/settings.gradle b/gf_web/android/settings.gradle new file mode 100644 index 00000000..5a2f14fb --- /dev/null +++ b/gf_web/android/settings.gradle @@ -0,0 +1,15 @@ +include ':app' + +def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + +def plugins = new Properties() +def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') +if (pluginsFile.exists()) { + pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } +} + +plugins.each { name, path -> + def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() + include ":$name" + project(":$name").projectDir = pluginDirectory +} diff --git a/gf_web/ios/.gitignore b/gf_web/ios/.gitignore new file mode 100644 index 00000000..e96ef602 --- /dev/null +++ b/gf_web/ios/.gitignore @@ -0,0 +1,32 @@ +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/gf_web/ios/Flutter/AppFrameworkInfo.plist b/gf_web/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..6b4c0f78 --- /dev/null +++ b/gf_web/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/gf_web/ios/Flutter/Debug.xcconfig b/gf_web/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/gf_web/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/gf_web/ios/Flutter/Release.xcconfig b/gf_web/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/gf_web/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/gf_web/ios/Runner.xcodeproj/project.pbxproj b/gf_web/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..6cd9af51 --- /dev/null +++ b/gf_web/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,518 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B80C3931E831B6300D905FE /* App.framework */, + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEBA1CF902C7004384FC /* Flutter.framework */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = "The Chromium Authors"; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.gfWeb; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.gfWeb; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.gfWeb; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/gf_web/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/gf_web/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/gf_web/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/gf_web/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/gf_web/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..a28140cf --- /dev/null +++ b/gf_web/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gf_web/ios/Runner.xcworkspace/contents.xcworkspacedata b/gf_web/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/gf_web/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/gf_web/ios/Runner/AppDelegate.swift b/gf_web/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..70693e4a --- /dev/null +++ b/gf_web/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d36b1fab --- /dev/null +++ b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 00000000..dc9ada47 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 00000000..28c6bf03 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 00000000..f091b6b0 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 00000000..4cde1211 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 00000000..d0ef06e7 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 00000000..dcdc2306 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 00000000..c8f9ed8f Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 00000000..75b2d164 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 00000000..c4df70d3 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 00000000..6a84f41e Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 00000000..d0e1f585 Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/gf_web/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/gf_web/ios/Runner/Base.lproj/LaunchScreen.storyboard b/gf_web/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/gf_web/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gf_web/ios/Runner/Base.lproj/Main.storyboard b/gf_web/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/gf_web/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gf_web/ios/Runner/Info.plist b/gf_web/ios/Runner/Info.plist new file mode 100644 index 00000000..f80a85cd --- /dev/null +++ b/gf_web/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gf_web + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/gf_web/ios/Runner/Runner-Bridging-Header.h b/gf_web/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..7335fdf9 --- /dev/null +++ b/gf_web/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" \ No newline at end of file diff --git a/gf_web/lib/assets/icons/avatar.png b/gf_web/lib/assets/icons/avatar.png new file mode 100644 index 00000000..685ad1a3 Binary files /dev/null and b/gf_web/lib/assets/icons/avatar.png differ diff --git a/gf_web/lib/assets/icons/back.png b/gf_web/lib/assets/icons/back.png new file mode 100644 index 00000000..6c90e89b Binary files /dev/null and b/gf_web/lib/assets/icons/back.png differ diff --git a/gf_web/lib/assets/icons/badge.png b/gf_web/lib/assets/icons/badge.png new file mode 100644 index 00000000..5d233517 Binary files /dev/null and b/gf_web/lib/assets/icons/badge.png differ diff --git a/gf_web/lib/assets/icons/buttons.png b/gf_web/lib/assets/icons/buttons.png new file mode 100644 index 00000000..d7cf8870 Binary files /dev/null and b/gf_web/lib/assets/icons/buttons.png differ diff --git a/gf_web/lib/assets/icons/buttons.svg b/gf_web/lib/assets/icons/buttons.svg new file mode 100644 index 00000000..415c67d3 --- /dev/null +++ b/gf_web/lib/assets/icons/buttons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/gf_web/lib/assets/icons/card.png b/gf_web/lib/assets/icons/card.png new file mode 100644 index 00000000..79543ea6 Binary files /dev/null and b/gf_web/lib/assets/icons/card.png differ diff --git a/gf_web/lib/assets/icons/chips.png b/gf_web/lib/assets/icons/chips.png new file mode 100644 index 00000000..99b08372 Binary files /dev/null and b/gf_web/lib/assets/icons/chips.png differ diff --git a/gf_web/lib/assets/icons/danger.svg b/gf_web/lib/assets/icons/danger.svg new file mode 100644 index 00000000..dea91e14 --- /dev/null +++ b/gf_web/lib/assets/icons/danger.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/gf_web/lib/assets/icons/dark.svg b/gf_web/lib/assets/icons/dark.svg new file mode 100644 index 00000000..a5e5eb1b --- /dev/null +++ b/gf_web/lib/assets/icons/dark.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/gf_web/lib/assets/icons/dribble.svg b/gf_web/lib/assets/icons/dribble.svg new file mode 100644 index 00000000..dbaca3b1 --- /dev/null +++ b/gf_web/lib/assets/icons/dribble.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/gf_web/lib/assets/icons/fb.svg b/gf_web/lib/assets/icons/fb.svg new file mode 100644 index 00000000..e6078c98 --- /dev/null +++ b/gf_web/lib/assets/icons/fb.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/gf_web/lib/assets/icons/google.svg b/gf_web/lib/assets/icons/google.svg new file mode 100644 index 00000000..d837859e --- /dev/null +++ b/gf_web/lib/assets/icons/google.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/gf_web/lib/assets/icons/images.png b/gf_web/lib/assets/icons/images.png new file mode 100644 index 00000000..b5e4cb02 Binary files /dev/null and b/gf_web/lib/assets/icons/images.png differ diff --git a/gf_web/lib/assets/icons/info.svg b/gf_web/lib/assets/icons/info.svg new file mode 100644 index 00000000..21fd193c --- /dev/null +++ b/gf_web/lib/assets/icons/info.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/gf_web/lib/assets/icons/items.png b/gf_web/lib/assets/icons/items.png new file mode 100644 index 00000000..1a495321 Binary files /dev/null and b/gf_web/lib/assets/icons/items.png differ diff --git a/gf_web/lib/assets/icons/light.svg b/gf_web/lib/assets/icons/light.svg new file mode 100644 index 00000000..bf6f73a6 --- /dev/null +++ b/gf_web/lib/assets/icons/light.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/gf_web/lib/assets/icons/link.svg b/gf_web/lib/assets/icons/link.svg new file mode 100644 index 00000000..9260d523 --- /dev/null +++ b/gf_web/lib/assets/icons/link.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/gf_web/lib/assets/icons/linkedin.svg b/gf_web/lib/assets/icons/linkedin.svg new file mode 100644 index 00000000..7adb1746 --- /dev/null +++ b/gf_web/lib/assets/icons/linkedin.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/gf_web/lib/assets/icons/lists.png b/gf_web/lib/assets/icons/lists.png new file mode 100644 index 00000000..e3e93174 Binary files /dev/null and b/gf_web/lib/assets/icons/lists.png differ diff --git a/gf_web/lib/assets/icons/menu.png b/gf_web/lib/assets/icons/menu.png new file mode 100644 index 00000000..0932d5f5 Binary files /dev/null and b/gf_web/lib/assets/icons/menu.png differ diff --git a/gf_web/lib/assets/icons/next.png b/gf_web/lib/assets/icons/next.png new file mode 100644 index 00000000..8d3c89d9 Binary files /dev/null and b/gf_web/lib/assets/icons/next.png differ diff --git a/gf_web/lib/assets/icons/pinterest.svg b/gf_web/lib/assets/icons/pinterest.svg new file mode 100644 index 00000000..7aa538e1 --- /dev/null +++ b/gf_web/lib/assets/icons/pinterest.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/gf_web/lib/assets/icons/primary.svg b/gf_web/lib/assets/icons/primary.svg new file mode 100644 index 00000000..c2ad37e4 --- /dev/null +++ b/gf_web/lib/assets/icons/primary.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/gf_web/lib/assets/icons/secondary.svg b/gf_web/lib/assets/icons/secondary.svg new file mode 100644 index 00000000..56c06ebe --- /dev/null +++ b/gf_web/lib/assets/icons/secondary.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/gf_web/lib/assets/icons/slack.svg b/gf_web/lib/assets/icons/slack.svg new file mode 100644 index 00000000..ed08c2a0 --- /dev/null +++ b/gf_web/lib/assets/icons/slack.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/gf_web/lib/assets/icons/slider.png b/gf_web/lib/assets/icons/slider.png new file mode 100644 index 00000000..03fb809b Binary files /dev/null and b/gf_web/lib/assets/icons/slider.png differ diff --git a/gf_web/lib/assets/icons/success.svg b/gf_web/lib/assets/icons/success.svg new file mode 100644 index 00000000..b06b4ae5 --- /dev/null +++ b/gf_web/lib/assets/icons/success.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/gf_web/lib/assets/icons/tabs.png b/gf_web/lib/assets/icons/tabs.png new file mode 100644 index 00000000..49678a20 Binary files /dev/null and b/gf_web/lib/assets/icons/tabs.png differ diff --git a/gf_web/lib/assets/icons/toast.png b/gf_web/lib/assets/icons/toast.png new file mode 100644 index 00000000..44ee2d77 Binary files /dev/null and b/gf_web/lib/assets/icons/toast.png differ diff --git a/gf_web/lib/assets/icons/toggle.png b/gf_web/lib/assets/icons/toggle.png new file mode 100644 index 00000000..f33816f9 Binary files /dev/null and b/gf_web/lib/assets/icons/toggle.png differ diff --git a/gf_web/lib/assets/icons/twitter.svg b/gf_web/lib/assets/icons/twitter.svg new file mode 100644 index 00000000..ac962749 --- /dev/null +++ b/gf_web/lib/assets/icons/twitter.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/gf_web/lib/assets/icons/typo.png b/gf_web/lib/assets/icons/typo.png new file mode 100644 index 00000000..90592362 Binary files /dev/null and b/gf_web/lib/assets/icons/typo.png differ diff --git a/gf_web/lib/assets/icons/warning.svg b/gf_web/lib/assets/icons/warning.svg new file mode 100644 index 00000000..aae2b731 --- /dev/null +++ b/gf_web/lib/assets/icons/warning.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/gf_web/lib/assets/icons/whatsapp.svg b/gf_web/lib/assets/icons/whatsapp.svg new file mode 100644 index 00000000..992ff345 --- /dev/null +++ b/gf_web/lib/assets/icons/whatsapp.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/gf_web/lib/assets/icons/youtube.svg b/gf_web/lib/assets/icons/youtube.svg new file mode 100644 index 00000000..b2503883 --- /dev/null +++ b/gf_web/lib/assets/icons/youtube.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/gf_web/lib/assets/logo.png b/gf_web/lib/assets/logo.png new file mode 100644 index 00000000..27e5cae0 Binary files /dev/null and b/gf_web/lib/assets/logo.png differ diff --git a/gf_web/lib/assets/screen.png b/gf_web/lib/assets/screen.png new file mode 100644 index 00000000..54aed019 Binary files /dev/null and b/gf_web/lib/assets/screen.png differ diff --git a/gf_web/lib/main.dart b/gf_web/lib/main.dart new file mode 100644 index 00000000..c06d0f7f --- /dev/null +++ b/gf_web/lib/main.dart @@ -0,0 +1,110 @@ +import 'package:flutter/material.dart'; +import 'package:gf_web/screens/pages/home.dart'; +import 'screens/layout/routes.dart'; + + +void main() => runApp(MyApp()); + +class MyApp extends StatelessWidget { + // This widget is the root of your application. + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + debugShowCheckedModeBanner: false, + + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + + initialRoute: "/", +routes: routes, + ); + } +} + + +class FirstScreen extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('First Screen'), + ), + body: Center( + child: RaisedButton( + child: Text('Launch screen'), + onPressed: () { + // Navigate to the second screen using a named route. + Navigator.pushNamed(context, '/second'); + }, + ), + ), + ); + } +} + +class SecondScreen extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Second Screen"), + ), + body: Center( + child: RaisedButton( + onPressed: () { + // Navigate back to the first screen by popping the current route + // off the stack. + Navigator.pushNamed(context, '/third'); + }, + child: Text('Third!'), + ), + ), + ); + } +} + +class ThirdScreen extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("3 Screen"), + ), + body: Center( + child: RaisedButton( + onPressed: () { + // Navigate back to the first screen by popping the current route + // off the stack. + Navigator.pushNamed(context, '/fourth'); + }, + child: Text('Fourth!'), + ), + ), + ); + } +} + +class FourthScreen extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("4 Screen"), + ), + body: Center( + child: RaisedButton( + onPressed: () { + // Navigate back to the first screen by popping the current route + // off the stack. + Navigator.pushNamed(context, '/'); + }, + child: Text('Go back!'), + ), + ), + ); + } +} \ No newline at end of file diff --git a/gf_web/lib/screens/buttons/standard-buttons.dart b/gf_web/lib/screens/buttons/standard-buttons.dart new file mode 100644 index 00000000..a6d8eac3 --- /dev/null +++ b/gf_web/lib/screens/buttons/standard-buttons.dart @@ -0,0 +1,442 @@ +import 'package:flutter/material.dart'; +import 'package:gf_web/screens/layout/layout.dart'; +import '../../styles/styles.dart'; +import 'package:ui_kit/components/button/gf_button.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/colors/gf_color.dart'; +import 'package:ui_kit/types/gf_type.dart'; +import 'package:ui_kit/size/gf_size.dart'; + +class StandardButtons extends StatefulWidget { + @override + _StandardButtonsState createState() => _StandardButtonsState(); +} + +class _StandardButtonsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: Layout( + body: ListView( + children: [ + Text('Standard Buttons', style: hintStyleTextblackbolder(),), + SizedBox( + height: 20, + ), + Text('Buttons of type Standard which comes in different sizes that can be used in forms, alerts, and more...', style: hintStyleTextblackdull(),), + SizedBox( + height: 30, + ), + Text('Solid Buttons', style: hintStyleTextblackbold(),), + GFCard( + content: Column( + children: [ + Row( + children: [ + Expanded(child: GFButton( + onPressed: (){}, + text: 'Primary', + textColor: Colors.white, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Primary', + textColor: Colors.white, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Primary', + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Secondary', + color: GFColor.secondary, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Success', + color: GFColor.success, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Warning', + color: GFColor.warning, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'danger', + color: GFColor.danger, + )) + ], + ), +SizedBox( + height: 20, +), + Row( + children: [ + Expanded(child: GFButton( + onPressed: (){}, + text: 'Info', + color: GFColor.info, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Light', + color: GFColor.light, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Dark', + color: GFColor.dark, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Link', + color: GFColor.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: Text('')) + + ], + ), + + ], + ), + ), + SizedBox( + height: 20, + ), + + Text('Disabled Buttons', style: hintStyleTextblackbold(),), + GFCard( + content: Column( + children: [ + Row( + children: [ + Expanded(child: GFButton( + onPressed:null, + text: 'Primary', + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Secondary', + color: GFColor.secondary, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Success', + color: GFColor.success, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Warning', + color: GFColor.warning, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'danger', + color: GFColor.danger, + )) + ], + ), + SizedBox( + height: 20, + ), + Row( + children: [ + Expanded(child: GFButton( + onPressed:null, + text: 'Info', + color: GFColor.info, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Light', + color: GFColor.light, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Dark', + color: GFColor.dark, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Link', + color: GFColor.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: Text('')) + + ], + ), + + ], + ), + ), + + SizedBox( + height: 20, + ), + + Text('Transparent Buttons', style: hintStyleTextblackbold(),), + GFCard( + content: Column( + children: [ + Row( + children: [ + Expanded(child: GFButton( + onPressed:null, + text: 'Primary', + type: GFType.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Secondary', + color: GFColor.secondary, + type: GFType.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Success', + color: GFColor.success, + type: GFType.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Warning', + color: GFColor.warning, + type: GFType.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'danger', + color: GFColor.danger, + type: GFType.transparent, + )) + ], + ), + SizedBox( + height: 20, + ), + Row( + children: [ + Expanded(child: GFButton( + onPressed:null, + text: 'Info', + color: GFColor.info, + type: GFType.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Light', + color: GFColor.light, + type: GFType.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed:null, + text: 'Dark', + color: GFColor.dark, + type: GFType.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: GFButton( + onPressed: (){}, + text: 'Link', + color: GFColor.transparent, + type: GFType.transparent, + )), + SizedBox( + width: 10, + ), + Expanded(child: Text('')) + + ], + ), + + ], + ), + ), + SizedBox( + height: 20, + ), + + Text(' Button Sizes', style: hintStyleTextblackbold(),), + GFCard( + content: Column( + children: [ + Row( + children: [ + Expanded(child:GFButton( + onPressed: (){}, + child: Text("Large", + ), + + size: GFSize.large, + ), + ), + SizedBox( + width: 10, + ), + Expanded(child:GFButton( + onPressed: (){}, + child: Text("Medium", + ), + size: GFSize.medium, + ), + ), + SizedBox( + width: 10, + ), + Expanded(child:GFButton( + onPressed: (){}, + child: Text("Small", + ), + size: GFSize.small, + ), + ), + + ], + ), + + + ], + ), + ), + + SizedBox( + height: 20, + ), + + Text(' Block Buttons', style: hintStyleTextblackbold(),), + GFCard( + content: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + GFButton( + onPressed: (){}, + blockButton: true, + child: Text("Large", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.large, + ), + + SizedBox( + height: 10, + ), + + GFButton( + onPressed: (){}, + blockButton: true, + child: Text("Normal", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.medium, + ), + + SizedBox( + height: 10, + ), + + + GFButton( + onPressed: (){}, + blockButton: true, + child: Text("Small", + style: TextStyle( + color: getGFColor(GFColor.white))), + color: GFColor.primary, + size: GFSize.small, + ), + SizedBox( + height: 10, + ), + + ], + ), + + ) + ], + ), + ), + ); + } +} diff --git a/gf_web/lib/screens/layout/body.dart b/gf_web/lib/screens/layout/body.dart new file mode 100644 index 00000000..f56ad48a --- /dev/null +++ b/gf_web/lib/screens/layout/body.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; + +class Body extends StatefulWidget { + @override + _BodyState createState() => _BodyState(); +} + +class _BodyState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body:Container( + margin: EdgeInsets.only(left: 40, top: 20), + child: ListView( + children: [ + Text('dfcghyjunkm') + ], + ), + ) + ); + } +} diff --git a/gf_web/lib/screens/layout/header.dart b/gf_web/lib/screens/layout/header.dart new file mode 100644 index 00000000..c9797ff1 --- /dev/null +++ b/gf_web/lib/screens/layout/header.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; + +class Header extends StatefulWidget { + @override + _HeaderState createState() => _HeaderState(); +} + +class _HeaderState extends State
{ + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: Container( + color: Colors.black, + width: MediaQuery.of(context).size.width, + height: 100, + child: Row( +// mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Flexible( + fit: FlexFit.tight, + flex: 6, +// child: Image.asset('lib/assets/logo.png') + child: Image.network('https://ik.imagekit.io/ionicfirebaseapp/get-flutter-logo_FAN-82xCG.png', height: 40.0,), + ), + Flexible( + fit: FlexFit.tight, + flex: 8, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text('Home', style: TextStyle(fontSize: 17, color: Colors.white, fontWeight: FontWeight.w600),), + Text('Features', style: TextStyle(fontSize: 17, color: Colors.white, fontWeight: FontWeight.w600),), + Text('Docs', style: TextStyle(fontSize: 17, color: Colors.white, fontWeight: FontWeight.w600),), + Text('Blog', style: TextStyle(fontSize: 17, color: Colors.white, fontWeight: FontWeight.w600),), + Text('Contact', style: TextStyle(fontSize: 17, color: Colors.white, fontWeight: FontWeight.w600),) + ], + )) + ], + ), + + ), + ); + } +} diff --git a/gf_web/lib/screens/layout/layout.dart b/gf_web/lib/screens/layout/layout.dart new file mode 100644 index 00000000..bfdf59d2 --- /dev/null +++ b/gf_web/lib/screens/layout/layout.dart @@ -0,0 +1,53 @@ +import 'package:flutter/material.dart'; +import 'package:gf_web/screens/layout/mobile-demo.dart'; +import 'sidebar.dart'; +import 'header.dart'; +import 'body.dart'; + +class Layout extends StatefulWidget { + final Widget body; + const Layout ({Key key, + this.body, + }):super(key:key); + + @override + _LayoutState createState() => _LayoutState(); +} + +class _LayoutState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: Column( + children: [ + Container( + height: 70, + child: Header(), + ), + Row( + children: [ + Container( + height: MediaQuery.of(context).size.height-70, + width: 300, + child: Sidebar(), + ), + Container( + padding: EdgeInsets.only(top: 20, left: 20, right: 20), + height:MediaQuery.of(context).size.height -70, + width: MediaQuery.of(context).size.width -730, + child: widget.body + ), + Container( + width: 430, +// color: Colors.red, + height: 600, + child: MobileDemo(), + ) + ], + ) + ], + ), + ); + } +} diff --git a/gf_web/lib/screens/layout/mobile-demo.dart b/gf_web/lib/screens/layout/mobile-demo.dart new file mode 100644 index 00000000..e7e0c21a --- /dev/null +++ b/gf_web/lib/screens/layout/mobile-demo.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; + +class MobileDemo extends StatefulWidget { + @override + _MobileDemoState createState() => _MobileDemoState(); +} + +class _MobileDemoState extends State { + @override + Widget build(BuildContext context) { + return Container( + height: 300, + child: Image.asset('lib/assets/screen.png'), + ); + } +} diff --git a/gf_web/lib/screens/layout/routes.dart b/gf_web/lib/screens/layout/routes.dart new file mode 100644 index 00000000..a2ef37f1 --- /dev/null +++ b/gf_web/lib/screens/layout/routes.dart @@ -0,0 +1,15 @@ + + + +import 'package:gf_web/screens/buttons/standard-buttons.dart'; +import 'package:gf_web/screens/pages/home.dart'; + + +//Map route = Map(); + +final routes = + { + '/gf-buttons/standard-button': (context) => StandardButtons(), +// '/third': (context) => ThirdScreen(), +// '/fourth':(context) => FourthScreen() + }; diff --git a/gf_web/lib/screens/layout/sidebar.dart b/gf_web/lib/screens/layout/sidebar.dart new file mode 100644 index 00000000..b3dc8934 --- /dev/null +++ b/gf_web/lib/screens/layout/sidebar.dart @@ -0,0 +1,236 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:gf_web/styles/styles.dart'; + +class Sidebar extends StatefulWidget { + @override + _SidebarState createState() => _SidebarState(); +} + +class _SidebarState extends State with TickerProviderStateMixin { + Animation animation; + AnimationController animationController; + AnimationController controller; + Animation offset; + + + @override + void initState() { + super.initState(); + animationController = AnimationController(duration: Duration(seconds: 2), vsync: this); + controller = AnimationController(vsync: this, duration: Duration(milliseconds: 300)); + offset = Tween(begin: Offset.zero, end: Offset(0.0, 0.1),).animate(controller); +// animation = Tween(begin: 1.0, end: 0.0).animate(CurvedAnimation(parent: animationController, curve: Curves.fastLinearToSlowEaseIn)); + } + + + + bool showButtonTypes = false; + @override + Widget build(BuildContext context) { + return Scaffold( + body: Container( +margin: EdgeInsets.only(right: 10,), + padding: EdgeInsets.only(left:60, right: 20, top:30), + width: 300, + height: MediaQuery.of(context).size.height, + decoration: BoxDecoration( + border: Border.all( + color: Colors.black.withOpacity(0.30) + ), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.40), + blurRadius: 5.0 + ), + ] + ), + child: ListView( + children: [ + + Text('COMPONENTS', style: hintStyleTextblack(),), + SizedBox( + height: 25, + ), + GestureDetector( + onTap: (){ + setState(() { + switch (controller.status) { + case AnimationStatus.completed: + controller.forward(from: 0); + break; + case AnimationStatus.dismissed: + controller.forward(); + break; + default: + } + showButtonTypes = !showButtonTypes; + }); + + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('GF Buttons', style: hintStyleTextblackdull()), + showButtonTypes? Icon(Icons.keyboard_arrow_down): Icon(Icons.keyboard_arrow_right) + ], + ) + ), + showButtonTypes? + SlideTransition( + position: offset, + child: Container( + height: 200, + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.40) + ) + ] + ), + padding: EdgeInsets.only(top:0, bottom: 30, left: 25, right: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GestureDetector( + onTap: (){ + Navigator.pushNamed(context, '/gf-buttons/standard-button'); + }, + child: Text('Standard Buttons'), + ), + Text('Pills Buttons'), + Text('Square Buttons'), + Text('Shadow Buttons'), + Text('Icon Buttons'), + Text('Social Buttons') + ], + ), + ), + ):Container(), + + SizedBox( + height: 20, + ), + + Text('GF Badge', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Avatar', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Image', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Card', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Slider', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Tile', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Tab', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Typography', style: hintStyleTextblackdull()), + SizedBox( + height: 30, + ), + Text('COMING SOON', style: hintStyleTextblack(),), + SizedBox( + height: 25, + ), + Text('GF Forms', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Chip', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + + Text('GF List', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Spinner', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Header', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Footer', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Toggle', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Drawer', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Accordian', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Toast', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Alert', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Model', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Action Sheet', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Floating Button', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Popover', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Recorder', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Infinite Scroll', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Searchbar', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + Text('GF Refresher', style: hintStyleTextblackdull()), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + } +} diff --git a/gf_web/lib/screens/pages/home.dart b/gf_web/lib/screens/pages/home.dart new file mode 100644 index 00000000..c26544f9 --- /dev/null +++ b/gf_web/lib/screens/pages/home.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; +import 'package:gf_web/screens/layout/layout.dart'; + + +class HomePage extends StatefulWidget { + @override + _HomePageState createState() => _HomePageState(); +} + +class _HomePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: Layout( + body: Column( + children: [ + Text('Introduction', style: TextStyle(fontSize: 20),), + SizedBox( + height: 20, + ), + Text('GetFlutter is UI libraries for building flutter app.', style: TextStyle(fontSize: 20),), + SizedBox( + height: 20, + ), + Image.network('https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LvKegU8SBuWnETMfqrz%2F-LxtgL3yw3epnXU4dni3%2F-LxtgsMugSV2jttI5pTC%2FButtons%403x.png?alt=media&token=54a7ad05-716d-4cd2-84f7-78e2697fbdec', + height: 600,) + ], + ) + ) + ); + } +} \ No newline at end of file diff --git a/gf_web/lib/styles/styles.dart b/gf_web/lib/styles/styles.dart new file mode 100644 index 00000000..7490beba --- /dev/null +++ b/gf_web/lib/styles/styles.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; + +final primary = const Color(0xff19CA4B); +final secondary = const Color(0xFFFF7644); +final blacktext = const Color(0xFF0D0D0D); +final blackdull = const Color(0xFFbababa); + + + +//.............................................RalewayRegular................................................................................... + +TextStyle hintStyleTextblackdull() { + return TextStyle( + fontWeight: FontWeight.w500, + fontSize: 16.0, + color: blacktext.withOpacity(0.60), + ); +} + +TextStyle hintStyleTextblack() { + return TextStyle( + fontWeight: FontWeight.w500, + fontSize: 17.0, + color: blacktext, + ); +} + +TextStyle hintStyleTextblackbold() { + return TextStyle( + fontWeight: FontWeight.w600, + fontSize: 23.0, + color: blacktext, + ); +} + +TextStyle hintStyleTextblackbolder() { + return TextStyle( + fontWeight: FontWeight.w600, + fontSize: 26.0, + color: blacktext, + ); +} \ No newline at end of file diff --git a/gf_web/pubspec.lock b/gf_web/pubspec.lock new file mode 100644 index 00000000..c6869e31 --- /dev/null +++ b/gf_web/pubspec.lock @@ -0,0 +1,202 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.6" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.8" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.4" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0+1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.11" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + ui_kit: + dependency: "direct dev" + description: + path: ".." + relative: true + source: path + version: "0.0.1" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "3.5.0" +sdks: + dart: ">=2.4.0 <3.0.0" diff --git a/gf_web/pubspec.yaml b/gf_web/pubspec.yaml new file mode 100644 index 00000000..7f4c2c0d --- /dev/null +++ b/gf_web/pubspec.yaml @@ -0,0 +1,26 @@ +name: gf_web +description: A new Flutter project. + +version: 1.0.0+1 + +environment: + sdk: ">=2.1.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + cupertino_icons: ^0.1.2 + +dev_dependencies: + flutter_test: + sdk: flutter + ui_kit: + path: ../ + +flutter: + uses-material-design: true + + assets: + - lib/assets/logo.png + - lib/assets/icons/next.png + - lib/assets/screen.png diff --git a/gf_web/test/widget_test.dart b/gf_web/test/widget_test.dart new file mode 100644 index 00000000..e89b8c9e --- /dev/null +++ b/gf_web/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:gf_web/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/gf_web/web/index.html b/gf_web/web/index.html new file mode 100644 index 00000000..3f15ee61 --- /dev/null +++ b/gf_web/web/index.html @@ -0,0 +1,10 @@ + + + + + gf_web + + + + + diff --git a/lib/colors/gf_color.dart b/lib/colors/gf_color.dart index f7a256d2..149d5e6c 100644 --- a/lib/colors/gf_color.dart +++ b/lib/colors/gf_color.dart @@ -17,17 +17,17 @@ enum GFColor { } -const PRIMARY = Color(0xff3f6ad8); -const SECONDARY = Color(0xff6c757c); -const SUCCESS =Color(0xff3ac47c); -const INFO = Color(0xff13aaff); -const WARNING = Color(0xfff7b825); -const DANGER = Color(0xffd92550); +const PRIMARY = Color(0xff3880FF); +const SECONDARY = Color(0xffAA66CC); +const SUCCESS =Color(0xff10DC60); +const INFO = Color(0xff33B5E5); +const WARNING = Color(0xffFFBB33); +const DANGER = Color(0xffF04141); +const LIGHT = Color(0xffE0E0E0); +const DARK = Color(0xff222428); +const WHITE = Color(0xffffffff); const FOCUS = Color(0xff434054); const ALT = Color(0xff794c8a); -const LIGHT = Color(0xffededed); -const DARK = Color(0xff333a40); -const WHITE = Color(0xffffffff); const TRANSPARENT = Colors.transparent; /// Pass [GFColor] or [Color] @@ -73,7 +73,7 @@ Color getGFColor(dynamic color) { return TRANSPARENT; break; default: - return PRIMARY; + return null; break; } } diff --git a/lib/components/avatar/gf_avatar.dart b/lib/components/avatar/gf_avatar.dart index 7cd3253b..26cbfcca 100644 --- a/lib/components/avatar/gf_avatar.dart +++ b/lib/components/avatar/gf_avatar.dart @@ -51,13 +51,15 @@ class GFAvatar extends StatelessWidget { this.maxRadius, this.borderRadius, this.shape = GFAvatarShape.circle, - this.size = GFSize.medium}) + this.size = GFSize.medium + }) : assert(radius == null || (minRadius == null && maxRadius == null)), super(key: key); + double get _minDiameter { if (radius == null && minRadius == null && maxRadius == null) { - return getGFSize(size); + return 1.5 * getGFSize(size); } else { return 2.0 * (radius ?? minRadius ?? 0); } @@ -65,7 +67,7 @@ class GFAvatar extends StatelessWidget { double get _maxDiameter { if (radius == null && minRadius == null && maxRadius == null) { - return getGFSize(size); + return 1.5 * getGFSize(size); } else { return 2.0 * (radius ?? maxRadius ?? 0); } diff --git a/lib/components/badge/gf_button_badge.dart b/lib/components/badge/gf_button_badge.dart index 0925bc51..39c6a0c6 100644 --- a/lib/components/badge/gf_button_badge.dart +++ b/lib/components/badge/gf_button_badge.dart @@ -1,125 +1,392 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter/widgets.dart'; import 'package:flutter/material.dart'; -import 'package:ui_kit/shape/gf_badge_shape.dart'; +import 'package:ui_kit/components/button/gf_button.dart'; import 'package:ui_kit/shape/gf_button_shape.dart'; import 'package:ui_kit/size/gf_size.dart'; import 'package:ui_kit/types/gf_type.dart'; import 'package:ui_kit/position/gf_position.dart'; import 'package:ui_kit/colors/gf_color.dart'; -import 'package:ui_kit/components/button/gf_button.dart'; -class GFButtonBadge extends StatefulWidget { - /// Called when the badge is tapped or otherwise activated. +class GFButtonBadge extends GFButton { + + /// Called when the button is tapped or otherwise activated. final VoidCallback onPressed; + /// Called by the underlying [InkWell] widget's [InkWell.onHighlightChanged] callback. + final ValueChanged onHighlightChanged; + /// Defines the default text style, with [Material.textStyle], for the button's [child]. final TextStyle textStyle; - /// The border side for the badge's [Material]. + /// The border side for the button's [Material]. final BorderSide borderSide; - /// The internal padding for the badge's [child]. + /// The box shadow for the button's [Material]. + final BoxShadow boxShadow; + + /// Pass [GFColor] or [Color]. The color for the button's [Material] when it has the input focus. + final dynamic focusColor; + + /// Pass [GFColor] or [Color]. The color for the button's [Material] when a pointer is hovering over it. + final dynamic hoverColor; + + /// Pass [GFColor] or [Color]. The highlight color for the button's [InkWell]. + final dynamic highlightColor; + + /// Pass [GFColor] or [Color]. The splash color for the button's [InkWell]. + final dynamic splashColor; + + /// The elevation for the button's [Material] when the button is [enabled] but not pressed. + final double elevation; + + /// The elevation for the button's [Material] when the button is [enabled] and a pointer is hovering over it. + final double hoverElevation; + + /// The elevation for the button's [Material] when the button is [enabled] and has the input focus. + final double focusElevation; + + /// The elevation for the button's [Material] when the button is [enabled] and pressed. + final double highlightElevation; + + /// The elevation for the button's [Material] when the button is not [enabled]. + final double disabledElevation; + + /// The internal padding for the button's [child]. final EdgeInsetsGeometry padding; - /// The shape of the badge's [Material]. + /// Defines the button's size. + final BoxConstraints constraints; + + /// The shape of the button's [Material]. final ShapeBorder borderShape; - /// Badge type of [GFType] i.e, solid, outline, transparent + /// Defines the duration of animated changes for [shape] and [elevation]. + final Duration animationDuration; + + /// Whether the button is enabled or disabled. + bool get enabled => onPressed != null; + + /// Configures the minimum size of the tap target. + final MaterialTapTargetSize materialTapTargetSize; + + /// {@macro flutter.widgets.Focus.focusNode} + final FocusNode focusNode; + + /// {@macro flutter.widgets.Focus.autofocus} + final bool autofocus; + + /// {@macro flutter.widgets.Clip} + final Clip clipBehavior; + + /// Button type of [GFType] i.e, solid, outline, outline2x, transparent final GFType type; - /// Badge type of [GFBadgeShape] i.e, standard, pills, square, circle + /// Button type of [GFButtonBadgeShape] i.e, standard, pills, square, shadow, icons final GFButtonShape shape; /// Pass [GFColor] or [Color] final dynamic color; + /// The fill color of the button when the button is disabled. + /// + /// The default value of this color is the theme's disabled color, + /// [ThemeData.disabledColor]. + /// + /// See also: + /// + /// * [color] - the fill color of the button when the button is [enabled]. + final dynamic disabledColor; + /// Pass [GFColor] or [Color] final dynamic textColor; + /// The color to use for this button's text when the button is disabled. + /// + /// The button's [Material.textStyle] will be the current theme's button + /// text style, [ThemeData.textTheme.button], configured with this color. + /// + /// The default value is the theme's disabled color, + /// [ThemeData.disabledColor]. + /// + /// If [textColor] is a [MaterialStateProperty], [disabledTextColor] + /// will be ignored. + /// + /// See also: + /// + /// * [textColor] - The color to use for this button's text when the button is [enabled]. + final dynamic disabledTextColor; + /// size of [double] or [GFSize] i.e, 1.2, small, medium, large etc. final dynamic size; - /// text of type [String] is used to display text on the button. + /// text of type [String] is alternative to child. text will get priority over child final String text; - /// child of type [Widget] is alternative to child. text will get priority over child. - /// You can use [GFBadge] for compatibility. - final Widget counterChild; - - /// icon type of [GFPosition] i.e, start, end + /// icon type of [GFIconPosition] i.e, start, end final GFPosition position; - /// Create badges of all types. check out [GFIconBadge] for icon badges and [GFBadge] for default badges. - const GFButtonBadge({ - Key key, - @required this.onPressed, - this.textStyle, - this.padding = const EdgeInsets.symmetric(horizontal: 8.0), - this.borderShape, - this.type = GFType.solid, - this.shape = GFButtonShape.standard, - this.color = GFColor.primary, - this.textColor, - this.position = GFPosition.end, - this.size = GFSize.medium, - this.borderSide, - @required this.text, - @required this.counterChild, - }) : assert(shape != null, 'Badge shape can not be null'), - assert(padding != null), - super(key: key); + /// on true state blockButton gives block size button + final bool blockButton; - @override - _GFButtonBadgeState createState() => _GFButtonBadgeState(); -} + /// on true state full width Button gives full width button + final bool fullWidthButton; -class _GFButtonBadgeState extends State { - Color color; - Color textColor; - Widget child; - Widget icon; - Function onPressed; - GFType type; - GFButtonShape shape; - double size; - GFPosition position; + /// on true state default box shadow appears around button + final bool buttonBoxShadow; + + /// A set of thirteen colors that can be used to derive the button theme's + /// colors. + /// + /// This property was added much later than the theme's set of highly + /// specific colors, like [ThemeData.buttonColor], [ThemeData.highlightColor], + /// [ThemeData.splashColor] etc. + /// + /// The colors for new button classes can be defined exclusively in terms + /// of [colorScheme]. When it's possible, the existing buttons will + /// (continue to) gradually migrate to it. + final ColorScheme colorScheme; + + /// Whether detected gestures should provide acoustic and/or haptic feedback. + /// + /// For example, on Android a tap will produce a clicking sound and a + /// long-press will produce a short vibration, when feedback is enabled. + /// + /// See also: + /// + /// * [Feedback] for providing platform-specific feedback to certain actions. + final bool enableFeedback; + + /// Called when the button is long-pressed. + /// + /// If this callback and [onPressed] are null, then the button will be disabled. + /// + /// See also: + /// + /// * [enabled], which is true if the button is enabled. + final VoidCallback onLongPress; + + /// Can be used to display [GFCounter], [Icons] inside button design + final Widget icon; + + /// Create buttons badges of all types. check out [GFIconButton] for icon buttons, and [GFBadge] for badges + const GFButtonBadge( + {Key key, + @required this.onPressed, + this.onHighlightChanged, + this.textStyle, + this.boxShadow, + this.buttonBoxShadow, + this.focusColor, + this.hoverColor, + this.highlightColor, + this.splashColor, + this.elevation = 0.0, + this.focusElevation = 4.0, + this.hoverElevation = 4.0, + this.highlightElevation = 1.0, + this.disabledElevation = 0.0, + this.padding = const EdgeInsets.symmetric(horizontal: 8.0), + this.constraints, + this.borderShape, + this.animationDuration = kThemeChangeDuration, + this.clipBehavior = Clip.none, + this.focusNode, + this.autofocus = false, + MaterialTapTargetSize materialTapTargetSize, + this.type = GFType.solid, + this.shape = GFButtonShape.standard, + this.color = GFColor.primary, + this.textColor, + this.position = GFPosition.end, + this.size = GFSize.medium, + this.borderSide, + this.text, + this.blockButton, + this.fullWidthButton, + this.colorScheme, + this.enableFeedback, + this.onLongPress, + this.disabledColor, + this.disabledTextColor, + this.icon, + }) + : materialTapTargetSize = + materialTapTargetSize ?? MaterialTapTargetSize.padded, + assert(shape != null, 'Button shape can not be null'), +// assert(elevation != null && elevation >= 0.0), + assert(focusElevation != null && focusElevation >= 0.0), + assert(hoverElevation != null && hoverElevation >= 0.0), + assert(highlightElevation != null && highlightElevation >= 0.0), + assert(disabledElevation != null && disabledElevation >= 0.0), + assert(padding != null), + assert(animationDuration != null), + assert(clipBehavior != null), + assert(autofocus != null); - @override - void initState() { - this.color = getGFColor(widget.color); - this.textColor = (widget.type == GFType.outline && widget.textColor == null) - ? this.color - : widget.textColor == null - ? getGFColor(GFColor.dark) - : getGFColor(widget.textColor); - this.onPressed = widget.onPressed; - this.type = widget.type; - this.shape = widget.shape; - this.size = getGFSize(widget.size); - this.position = widget.position; - super.initState(); - } @override Widget build(BuildContext context) { + return ConstrainedBox( constraints: BoxConstraints(minHeight: 26.0, minWidth: 98.0), child: Container( - height: this.size, + height: getGFSize(size), child: GFButton( - textStyle: widget.textStyle, - borderSide: widget.borderSide, - color: this.color, - textColor: this.textColor, - text: widget.text, - onPressed: this.onPressed, - type: this.type, - shape: this.shape, - position: this.position, - size: this.size, - borderShape: widget.borderShape, - icon: widget.counterChild, + onPressed: onPressed, + onHighlightChanged: onHighlightChanged, + textStyle: textStyle, + boxShadow: boxShadow, + buttonBoxShadow: buttonBoxShadow, + focusColor: focusColor, + hoverColor: hoverColor, + highlightColor: highlightColor, + splashColor: splashColor, + elevation: elevation, + focusElevation: focusElevation, + hoverElevation: hoverElevation, + highlightElevation:highlightElevation, + disabledElevation: disabledElevation, + constraints: constraints, + borderShape: borderShape, + animationDuration: animationDuration, + clipBehavior: clipBehavior, + focusNode: focusNode, + autofocus : autofocus , +// child: child, + type : type, + shape : shape, + color : color, + textColor: textColor, + position : position, + size : getGFSize(size), + borderSide: borderSide, + text: text, + icon: icon, + blockButton: blockButton, + fullWidthButton: fullWidthButton, + disabledColor: disabledTextColor, + disabledTextColor: disabledColor, ), ), ); } } + + + + + +//class GFButtonBadge extends StatefulWidget { +// /// Called when the badge is tapped or otherwise activated. +// final VoidCallback onPressed; +// +// /// Defines the default text style, with [Material.textStyle], for the button's [child]. +// final TextStyle textStyle; +// +// /// The border side for the badge's [Material]. +// final BorderSide borderSide; +// +// /// The internal padding for the badge's [child]. +// final EdgeInsetsGeometry padding; +// +// /// The shape of the badge's [Material]. +// final ShapeBorder borderShape; +// +// /// Badge type of [GFType] i.e, solid, outline, transparent +// final GFType type; +// +// /// Badge type of [GFBadgeShape] i.e, standard, pills, square, circle +// final GFButtonShape shape; +// +// /// Pass [GFColor] or [Color] +// final dynamic color; +// +// /// Pass [GFColor] or [Color] +// final dynamic textColor; +// +// /// size of [double] or [GFSize] i.e, 1.2, small, medium, large etc. +// final dynamic size; +// +// /// text of type [String] is used to display text on the button. +// final String text; +// +// /// child of type [Widget] is alternative to child. text will get priority over child. +// /// You can use [GFBadge] for compatibility. +// final Widget counter; +// +// /// icon type of [GFPosition] i.e, start, end +// final GFPosition position; +// +// /// Create badges of all types. check out [GFIconBadge] for icon badges and [GFBadge] for default badges. +// const GFButtonBadge({ +// Key key, +// @required this.onPressed, +// this.textStyle, +// this.padding = const EdgeInsets.symmetric(horizontal: 8.0), +// this.borderShape, +// this.type = GFType.solid, +// this.shape = GFButtonShape.standard, +// this.color = GFColor.primary, +// this.textColor, +// this.position = GFPosition.end, +// this.size = GFSize.medium, +// this.borderSide, +// @required this.text, +// @required this.counter, +// }) : assert(shape != null, 'Badge shape can not be null'), +// assert(padding != null), +// super(key: key); +// +// @override +// _GFButtonBadgeState createState() => _GFButtonBadgeState(); +//} +// +//class _GFButtonBadgeState extends State { +// Color color; +// Color textColor; +// Widget child; +// Widget icon; +// Function onPressed; +// GFType type; +// GFButtonShape shape; +// double size; +// GFPosition position; +// +// @override +// void initState() { +// this.color = getGFColor(widget.color); +// this.textColor = getGFColor(widget.textColor); +// this.onPressed = widget.onPressed; +// this.type = widget.type; +// this.shape = widget.shape; +// this.size = getGFSize(widget.size); +// this.position = widget.position; +// super.initState(); +// } +// +// @override +// Widget build(BuildContext context) { +// return ConstrainedBox( +// constraints: BoxConstraints(minHeight: 26.0, minWidth: 98.0), +// child: Container( +// height: this.size, +// child: GFButton( +// textStyle: widget.textStyle, +// borderSide: widget.borderSide, +// color: this.color, +// textColor: this.textColor, +// text: widget.text, +// onPressed: this.onPressed, +// type: this.type, +// shape: this.shape, +// position: this.position, +// size: this.size, +// borderShape: widget.borderShape, +// icon: widget.counter, +// ), +// ), +// ); +// } +//} diff --git a/lib/components/badge/gf_icon_badge.dart b/lib/components/badge/gf_icon_badge.dart index 88f9a269..f0329c2f 100644 --- a/lib/components/badge/gf_icon_badge.dart +++ b/lib/components/badge/gf_icon_badge.dart @@ -2,12 +2,10 @@ import 'package:flutter/material.dart'; import 'package:ui_kit/components/button/gf_icon_button.dart'; class GFIconBadge extends StatefulWidget { - /// Called when the badge is tapped or otherwise activated. - final VoidCallback onPressed; /// child of type [GFIconButton] is used to show icon. /// Use [Icon] widget for compatibility. - final GFIconButton child; + final Widget child; /// widget of type [Widget] is used to show counter to the top right corner of child. /// You can use [GFBadge] for compatibility. @@ -19,7 +17,6 @@ class GFIconBadge extends StatefulWidget { /// Create badges of all types, check out [GFBadge] for button badges and [GFIconBadge] for icon badges. const GFIconBadge({ Key key, - @required this.onPressed, this.padding = const EdgeInsets.symmetric(horizontal: 8.0), @required this.child, @required this.counterChild, diff --git a/lib/components/button/gf_button.dart b/lib/components/button/gf_button.dart index 8b27863e..890d16b8 100644 --- a/lib/components/button/gf_button.dart +++ b/lib/components/button/gf_button.dart @@ -83,7 +83,7 @@ class GFButton extends StatefulWidget { /// {@macro flutter.widgets.Clip} final Clip clipBehavior; - /// Button type of [GFType] i.e, solid, outline, dashed + /// Button type of [GFType] i.e, solid, outline, outline2x, transparent final GFType type; /// Button type of [GFButtonShape] i.e, standard, pills, square, shadow, icons @@ -92,9 +92,35 @@ class GFButton extends StatefulWidget { /// Pass [GFColor] or [Color] final dynamic color; + /// The fill color of the button when the button is disabled. + /// + /// The default value of this color is the theme's disabled color, + /// [ThemeData.disabledColor]. + /// + /// See also: + /// + /// * [color] - the fill color of the button when the button is [enabled]. + final dynamic disabledColor; + /// Pass [GFColor] or [Color] final dynamic textColor; + /// The color to use for this button's text when the button is disabled. + /// + /// The button's [Material.textStyle] will be the current theme's button + /// text style, [ThemeData.textTheme.button], configured with this color. + /// + /// The default value is the theme's disabled color, + /// [ThemeData.disabledColor]. + /// + /// If [textColor] is a [MaterialStateProperty], [disabledTextColor] + /// will be ignored. + /// + /// See also: + /// + /// * [textColor] - The color to use for this button's text when the button is [enabled]. + final dynamic disabledTextColor; + /// size of [double] or [GFSize] i.e, 1.2, small, medium, large etc. final dynamic size; @@ -150,47 +176,50 @@ class GFButton extends StatefulWidget { /// Create buttons of all types. check out [GFIconButton] for icon buttons, and [GFBadge] for badges const GFButton( {Key key, - @required this.onPressed, - this.onHighlightChanged, - this.textStyle, - this.boxShadow, - this.buttonBoxShadow, - this.focusColor, - this.hoverColor, - this.highlightColor, - this.splashColor, - this.elevation = 2.0, - this.focusElevation = 4.0, - this.hoverElevation = 4.0, - this.highlightElevation = 1.0, - this.disabledElevation = 0.0, - this.padding = const EdgeInsets.symmetric(horizontal: 8.0), - this.constraints, - this.borderShape, - this.animationDuration = kThemeChangeDuration, - this.clipBehavior = Clip.none, - this.focusNode, - this.autofocus = false, - MaterialTapTargetSize materialTapTargetSize, - this.child, - this.type = GFType.solid, - this.shape = GFButtonShape.standard, - this.color = GFColor.primary, - this.textColor, - this.position = GFPosition.start, - this.size = GFSize.medium, - this.borderSide, - this.text, - this.icon, - this.blockButton, - this.fullWidthButton, - this.colorScheme, - this.enableFeedback, - this.onLongPress}) + @required this.onPressed, + this.onHighlightChanged, + this.textStyle, + this.boxShadow, + this.buttonBoxShadow, + this.focusColor, + this.hoverColor, + this.highlightColor, + this.splashColor, + this.elevation = 0.0, + this.focusElevation = 4.0, + this.hoverElevation = 4.0, + this.highlightElevation = 1.0, + this.disabledElevation = 0.0, + this.padding = const EdgeInsets.symmetric(horizontal: 8.0), + this.constraints, + this.borderShape, + this.animationDuration = kThemeChangeDuration, + this.clipBehavior = Clip.none, + this.focusNode, + this.autofocus = false, + MaterialTapTargetSize materialTapTargetSize, + this.child, + this.type = GFType.solid, + this.shape = GFButtonShape.standard, + this.color = GFColor.primary, + this.textColor, + this.position = GFPosition.start, + this.size = GFSize.medium, + this.borderSide, + this.text, + this.icon, + this.blockButton, + this.fullWidthButton, + this.colorScheme, + this.enableFeedback, + this.onLongPress, + this.disabledColor, + this.disabledTextColor, + }) : materialTapTargetSize = - materialTapTargetSize ?? MaterialTapTargetSize.padded, + materialTapTargetSize ?? MaterialTapTargetSize.padded, assert(shape != null, 'Button shape can not be null'), - assert(elevation != null && elevation >= 0.0), +// assert(elevation != null && elevation >= 0.0), assert(focusElevation != null && focusElevation >= 0.0), assert(hoverElevation != null && hoverElevation >= 0.0), assert(highlightElevation != null && highlightElevation >= 0.0), @@ -207,7 +236,9 @@ class GFButton extends StatefulWidget { class _GFButtonState extends State { Color color; + Color disabledColor; Color textColor; + Color disabledTextColor; Widget child; Widget icon; Function onPressed; @@ -222,11 +253,7 @@ class _GFButtonState extends State { @override void initState() { this.color = getGFColor(widget.color); - this.textColor = widget.type == GFType.outline && widget.textColor == null - ? this.color - : widget.textColor == null - ? getGFColor(GFColor.dark) - : getGFColor(widget.textColor); + this.textColor = getGFColor(widget.textColor); this.child = widget.text != null ? Text(widget.text) : widget.child; this.icon = widget.icon; this.onPressed = widget.onPressed; @@ -234,13 +261,15 @@ class _GFButtonState extends State { this.shape = widget.shape; this.size = getGFSize(widget.size); this.position = widget.position; + this.disabledColor = getGFColor(widget.disabledColor); + this.disabledTextColor = getGFColor(widget.disabledTextColor); _updateState(MaterialState.disabled, !widget.enabled); super.initState(); } bool get _hovered => _states.contains(MaterialState.hovered); - // bool get _focused => _states.contains(MaterialState.focused); + bool get _focused => _states.contains(MaterialState.focused); bool get _pressed => _states.contains(MaterialState.pressed); bool get _disabled => _states.contains(MaterialState.disabled); @@ -277,13 +306,13 @@ class _GFButtonState extends State { } } - // void _handleFocusedChanged(bool value) { - // if (_focused != value) { - // setState(() { - // _updateState(MaterialState.focused, value); - // }); - // } - // } + void _handleFocusedChanged(bool value) { + if (_focused != value) { + setState(() { + _updateState(MaterialState.focused, value); + }); + } + } @override void didUpdateWidget(GFButton oldWidget) { @@ -298,19 +327,102 @@ class _GFButtonState extends State { super.didUpdateWidget(oldWidget); } + double get _effectiveElevation { + // These conditionals are in order of precedence, so be careful about + // reorganizing them. + if (_disabled) { + return widget.disabledElevation; + } + if (_pressed) { + return widget.highlightElevation; + } + if (_hovered) { + return widget.hoverElevation; + } + if (_focused) { + return widget.focusElevation; + } + return widget.elevation; + } + + @override Widget build(BuildContext context) { ShapeBorder shape; + Color getBorderColor() { + if(widget.enabled){ + final Color fillColor = this.color == null ? getGFColor(GFColor.primary) : this.color; + if (fillColor != null) + return fillColor; + }else{ + if (this.disabledColor != null) + return this.disabledColor; + else { + return this.color.withOpacity(0.48); + } + } + } + + Color getDisabledFillColor() { + if (widget.type == GFType.transparent || widget.type == GFType.outline || widget.type == GFType.outline2x) + return Colors.transparent; + if (this.disabledColor != null) + return this.disabledColor; + else { + return this.color.withOpacity(0.48); + } + } + + Color getColor() { + if (widget.type == GFType.transparent || widget.type == GFType.outline || widget.type == GFType.outline2x) + return Colors.transparent; + else{ + final Color fillColor = this.color == null ? getGFColor(GFColor.primary) : this.color; + if (fillColor != null) + return fillColor; + } + } + + Color getDisabledTextColor() { + + if (this.disabledTextColor != null) + return this.disabledTextColor; + else if (widget.type == GFType.outline || widget.type == GFType.outline2x || widget.type == GFType.transparent){ + return this.color; + }else{ + return getGFColor(GFColor.dark); + } + } + + + Color getTextColor() { + + if (widget.type == GFType.outline || widget.type == GFType.outline2x || widget.type == GFType.transparent){ + return widget.enabled ? this.textColor == null ? + this.color == getGFColor(GFColor.transparent) ? getGFColor(GFColor.dark) : this.color : this.textColor : getDisabledTextColor(); + } + if (this.textColor == null) { + if(this.color == getGFColor(GFColor.transparent)){ + return getGFColor(GFColor.dark); + }else { + return getGFColor(GFColor.white); + } + } + else{ + return this.textColor; + } + } + final Color effectiveTextColor = MaterialStateProperty.resolveAs( widget.textStyle?.color, _states); final Color themeColor = - Theme.of(context).colorScheme.onSurface.withOpacity(0.12); + Theme.of(context).colorScheme.onSurface.withOpacity(0.12); final BorderSide outlineBorder = BorderSide( color: this.color == null ? themeColor - : widget.borderSide == null ? this.color : widget.borderSide.color, - width: widget.borderSide?.width ?? 1.0, + : widget.borderSide == null ? getBorderColor() : widget.borderSide.color, + width: widget.borderSide?.width == null ? widget.type == GFType.outline2x ? 2.0 : 1.0 : widget.borderSide?.width, ); Size minSize; @@ -326,14 +438,16 @@ class _GFButtonState extends State { break; } - final BorderSide shapeBorder = widget.type == GFType.outline + + + final BorderSide shapeBorder = widget.type == GFType.outline || widget.type == GFType.outline2x ? outlineBorder : widget.borderSide != null - ? widget.borderSide - : BorderSide( - color: this.color == null ? themeColor : this.color, - width: 0.0, - ); + ? widget.borderSide + : BorderSide( + color: this.color == null ? themeColor : getBorderColor(), + width: 0.0, + ); if (this.shape == GFButtonShape.pills) { shape = RoundedRectangleBorder( @@ -343,7 +457,7 @@ class _GFButtonState extends State { borderRadius: BorderRadius.circular(0.0), side: shapeBorder); } else if (this.shape == GFButtonShape.standard) { shape = RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5.0), side: shapeBorder); + borderRadius: BorderRadius.circular(3.0), side: shapeBorder); } else { shape = RoundedRectangleBorder( borderRadius: BorderRadius.circular(50.0), side: shapeBorder); @@ -356,100 +470,113 @@ class _GFButtonState extends State { } else { return BoxDecoration( color: widget.type == GFType.transparent || - widget.type == GFType.outline + widget.type == GFType.outline || widget.type == GFType.outline2x ? Colors.transparent : this.color, borderRadius: widget.shape == GFButtonShape.pills ? BorderRadius.circular(50.0) : widget.shape == GFButtonShape.standard - ? BorderRadius.circular(5.0) - : BorderRadius.zero, + ? BorderRadius.circular(5.0) + : BorderRadius.zero, boxShadow: [ widget.boxShadow == null && widget.buttonBoxShadow == true ? BoxShadow( - color: themeColor, - blurRadius: 1.5, - spreadRadius: 2.0, - offset: Offset.zero, - ) + color: themeColor, + blurRadius: 1.5, + spreadRadius: 2.0, + offset: Offset.zero, + ) : widget.boxShadow != null - ? widget.boxShadow - : BoxShadow( - color: Theme.of(context).canvasColor, - blurRadius: 0.0, - spreadRadius: 0.0, - offset: Offset.zero, - ), + ? widget.boxShadow + : BoxShadow( + color: Theme.of(context).canvasColor, + blurRadius: 0.0, + spreadRadius: 0.0, + offset: Offset.zero, + ), ]); } } return null; } + getTextStyle(){ + if(widget.size == GFSize.small){ + return TextStyle(color: widget.enabled ? getTextColor() : getDisabledTextColor(), fontSize: 12); + }else if(widget.size == GFSize.medium){ + return TextStyle(color: widget.enabled ? getTextColor() : getDisabledTextColor(), fontSize: 13, fontWeight: FontWeight.w400); + } + else if(widget.size == GFSize.large){ + return TextStyle(color: widget.enabled ? getTextColor() : getDisabledTextColor(), fontSize: 14, fontWeight: FontWeight.w500); + } + } + final Widget result = Container( constraints: this.icon == null - ? BoxConstraints(minHeight: 26.0, minWidth: 88.0) - : BoxConstraints(minHeight: 26.0, minWidth: 98.0), + ? BoxConstraints(minWidth: 80.0) + : BoxConstraints(minWidth: 90.0), decoration: getBoxShadow(), child: Material( + elevation: _effectiveElevation, textStyle: widget.textStyle == null - ? TextStyle(color: this.textColor, fontSize: 14) + ? getTextStyle() : widget.textStyle, shape: widget.type == GFType.transparent ? null : widget.borderShape == null ? shape : widget.borderShape, - color: - widget.type == GFType.transparent || widget.type == GFType.outline - ? Colors.transparent - : this.color, + color: widget.enabled ? getColor() : getDisabledFillColor(), type: this.color == null ? MaterialType.transparency : MaterialType.button, animationDuration: widget.animationDuration, clipBehavior: widget.clipBehavior, child: InkWell( + focusNode: widget.focusNode, + canRequestFocus: widget.enabled, + onFocusChange: _handleFocusedChanged, + autofocus: widget.autofocus, onHighlightChanged: _handleHighlightChanged, + onHover: _handleHoveredChanged, + onTap: widget.onPressed, + onLongPress: widget.onLongPress, + enableFeedback: widget.enableFeedback, splashColor: getGFColor(widget.splashColor), highlightColor: getGFColor(widget.highlightColor), focusColor: getGFColor(widget.focusColor), hoverColor: getGFColor(widget.hoverColor), - onHover: _handleHoveredChanged, - onTap: widget.onPressed, customBorder: widget.type == GFType.transparent ? null : widget.borderShape == null ? shape : widget.borderShape, child: IconTheme.merge( data: IconThemeData(color: effectiveTextColor), child: Container( - height: widget.blockButton == true - ? BLOCK - : widget.fullWidthButton == true ? BLOCK : this.size, + height: this.size, width: buttonWidth(), padding: widget.padding, child: Center( widthFactor: 1.0, heightFactor: 1.0, child: this.icon != null && - (this.position == GFPosition.start || - this.position == null) + (this.position == GFPosition.start || + this.position == null) ? Row( - mainAxisSize: MainAxisSize.min, - children: [ - this.icon, - const SizedBox(width: 8.0), - this.child - ], - ) + mainAxisSize: MainAxisSize.min, + children: [ + this.icon, + const SizedBox(width: 8.0), + this.child + ], + ) : this.icon != null && (this.position == GFPosition.end) - ? Row( - mainAxisSize: MainAxisSize.min, - children: [ - this.child, - const SizedBox(width: 8.0), - this.icon - ], - ) - : this.child, + ? Row( + mainAxisSize: MainAxisSize.min, + children: [ + this.child, + const SizedBox(width: 8.0), + this.icon + ], + ) + : this.child, ), ), ), @@ -457,30 +584,30 @@ class _GFButtonState extends State { ), ); - return Semantics( - container: true, - button: true, - enabled: widget.enabled, - child: _InputPadding( - minSize: minSize, - child: result, - ), - ); - // return Semantics( // container: true, // button: true, // enabled: widget.enabled, // child: _InputPadding( // minSize: minSize, -// child: Focus( -// focusNode: widget.focusNode, -// onFocusChange: _handleFocusedChanged, -// autofocus: widget.autofocus, -// child: -// ), +// child: result, // ), // ); + + return Semantics( + container: true, + button: true, + enabled: widget.enabled, + child: _InputPadding( + minSize: minSize, + child: Focus( + focusNode: widget.focusNode, + onFocusChange: _handleFocusedChanged, + autofocus: widget.autofocus, + child: result + ), + ), + ); } } @@ -578,4 +705,4 @@ class _RenderInputPadding extends RenderShiftedBox { }, ); } -} +} \ No newline at end of file diff --git a/lib/components/button_bar/gf_button_bar.dart b/lib/components/button/gf_button_bar.dart similarity index 100% rename from lib/components/button_bar/gf_button_bar.dart rename to lib/components/button/gf_button_bar.dart diff --git a/lib/components/button/gf_icon_button.dart b/lib/components/button/gf_icon_button.dart index 573b68a6..33473552 100644 --- a/lib/components/button/gf_icon_button.dart +++ b/lib/components/button/gf_icon_button.dart @@ -2,7 +2,7 @@ import 'dart:math' as math; import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter/material.dart'; -import 'package:ui_kit/shape/gf_button_shape.dart'; +import 'package:ui_kit/shape/gf_icon_button_shape.dart'; import 'package:ui_kit/size/gf_size.dart'; import 'package:ui_kit/types/gf_type.dart'; import 'package:ui_kit/colors/gf_color.dart'; @@ -26,11 +26,11 @@ class GFIconButton extends StatefulWidget { /// The color for the button's icon when a pointer is hovering over it. final Color hoverColor; - /// Button type of [GFType] i.e, solid, outline, transparent + /// Button type of [GFType] i.e, solid, outline, outline2x transparent final GFType type; - /// Button type of [GFButtonShape] i.e, standard, pills, square, shadow, icons - final GFButtonShape shape; + /// Button type of [GFIconButtonShape] i.e, standard, pills, square, shadow, icons + final GFIconButtonShape shape; /// Pass [GFColor] or [Color] final dynamic color; @@ -87,14 +87,15 @@ class GFIconButton extends StatefulWidget { this.focusNode, this.autofocus = false, this.tooltip, - this.type = GFType.transparent, - this.shape = GFButtonShape.standard, + this.type = GFType.solid, + this.shape = GFIconButtonShape.standard, this.color = GFColor.primary, this.borderShape, this.boxShadow, this.size = GFSize.medium, this.buttonBoxShadow, - this.borderSide}) + this.borderSide, + }) : assert(iconSize != null), assert(padding != null), assert(alignment != null), @@ -110,7 +111,7 @@ class _GFIconButtonState extends State { Color color; Function onPressed; GFType type; - GFButtonShape shape; + GFIconButtonShape shape; BoxShadow boxShadow; double height; double width; @@ -128,20 +129,45 @@ class _GFIconButtonState extends State { @override Widget build(BuildContext context) { assert(debugCheckHasMaterial(context)); - Color currentColor; - if (widget.onPressed != null) - currentColor = widget.color; - else - currentColor = widget.disabledColor ?? Theme.of(context).disabledColor; + + Color getBorderColor() { + if(widget.onPressed != null){ + return this.color; + }else{ + if (widget.disabledColor != null) + return widget.disabledColor; + else { + return this.color.withOpacity(0.48); + } + } + } + + Color getDisabledFillColor() { + if (widget.type == GFType.transparent || widget.type == GFType.outline || widget.type == GFType.outline2x) + return Colors.transparent; + if (widget.disabledColor != null) + return widget.disabledColor; + else { + return this.color.withOpacity(0.48); + } + } + + Color getColor() { + if (widget.type == GFType.transparent || widget.type == GFType.outline || widget.type == GFType.outline2x) + return Colors.transparent; + else{ + return this.color; + } + } final Color themeColor = Theme.of(context).colorScheme.onSurface.withOpacity(0.12); final BorderSide outlineBorder = BorderSide( - color: widget.borderSide == null ? themeColor : widget.borderSide.color, - width: widget.borderSide?.width ?? 1.0, + color: widget.borderSide == null ? getBorderColor() : widget.borderSide.color, + width: widget.borderSide?.width == null ? widget.type == GFType.outline2x ? 2.0 : 1.0 : widget.borderSide?.width, ); - final BorderSide shapeBorder = widget.type == GFType.outline + final BorderSide shapeBorder = widget.type == GFType.outline || widget.type == GFType.outline2x ? outlineBorder : widget.borderSide != null ? widget.borderSide @@ -152,47 +178,50 @@ class _GFIconButtonState extends State { ShapeBorder shape; - if (this.shape == GFButtonShape.pills) { - shape = RoundedRectangleBorder( - borderRadius: BorderRadius.circular(50.0), side: shapeBorder); - } else if (this.shape == GFButtonShape.square) { - shape = RoundedRectangleBorder( - borderRadius: BorderRadius.circular(0.0), side: shapeBorder); - } else if (this.shape == GFButtonShape.standard) { - shape = RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5.0), side: shapeBorder); - } else { - shape = RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5.0), side: shapeBorder); + if (this.shape == GFIconButtonShape.pills) { + shape = RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0), side: shapeBorder); + } else if (this.shape == GFIconButtonShape.square) { + shape = RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.0), side: shapeBorder); + } else if (this.shape == GFIconButtonShape.standard) { + shape = RoundedRectangleBorder(borderRadius: BorderRadius.circular(3.0), side: shapeBorder); + } else if (this.shape == GFIconButtonShape.circle) { + shape = RoundedRectangleBorder(borderRadius: BorderRadius.circular(50.0), side: shapeBorder); } if (widget.size == GFSize.small) { - this.height = 36.0; - this.width = 36.0; - this.iconPixel = 24.0; + this.height = 30.0; + this.width = 30.0; + this.iconPixel = 18.0; } else if (widget.size == GFSize.medium) { - this.height = 44.0; - this.width = 44.0; - this.iconPixel = 24.0; + this.height = 35.0; + this.width = 35.0; + this.iconPixel = 18.0; } else if (widget.size == GFSize.large) { - this.height = 50.0; - this.width = 50.0; - this.iconPixel = 28.0; - } else { - this.height = 44.0; - this.width = 44.0; - this.iconPixel = 24.0; + this.height = 40.0; + this.width = 40.0; + this.iconPixel = 18.0; + } + + getIconColor(){ + if (widget.type == GFType.transparent || widget.type == GFType.outline || widget.type == GFType.outline2x) + return widget.onPressed != null ? + this.color == getGFColor(GFColor.transparent) ? getGFColor(GFColor.dark) : this.color : this.color.withOpacity(0.48); + else if(this.color == getGFColor(GFColor.transparent)){ + return widget.onPressed != null ? getGFColor(GFColor.dark) : getGFColor(GFColor.white); + } + else{ + return getGFColor(GFColor.white); + } } Widget result = Container( - height: - widget.shape == GFButtonShape.pills ? this.height + 6 : this.height, - width: widget.shape == GFButtonShape.pills ? this.width + 6 : this.width, + height: widget.shape == GFIconButtonShape.circle ? this.height + 6 : this.height, + width: widget.shape == GFIconButtonShape.pills ? this.width + 10 : widget.shape == GFIconButtonShape.circle ? this.height + 6 : this.width, padding: widget.padding, child: IconTheme.merge( data: IconThemeData( size: widget.iconSize > 0.0 ? widget.iconSize : this.iconPixel, - color: currentColor, + color: getIconColor(), ), child: widget.icon, ), @@ -211,14 +240,9 @@ class _GFIconButtonState extends State { return null; } else { return BoxDecoration( - color: widget.type == GFType.transparent || - widget.type == GFType.outline - ? Colors.transparent - : this.color, - borderRadius: widget.shape == GFButtonShape.pills - ? BorderRadius.circular(50.0) - : widget.shape == GFButtonShape.standard - ? BorderRadius.circular(5.0) + color: widget.onPressed != null ? getColor() : getDisabledFillColor(), + borderRadius: widget.shape == GFIconButtonShape.circle ? BorderRadius.circular(50.0) + : widget.shape == GFIconButtonShape.standard ? BorderRadius.circular(3.0) : widget.shape == GFIconButtonShape.pills ? BorderRadius.circular(20.0) : BorderRadius.zero, boxShadow: [ widget.boxShadow == null && widget.buttonBoxShadow == true @@ -251,21 +275,14 @@ class _GFIconButtonState extends State { child: ConstrainedBox( constraints: BoxConstraints(maxWidth: 60.0, maxHeight: 60.0), child: Container( - height: widget.shape == GFButtonShape.pills - ? this.height + 6 - : this.height, - width: widget.shape == GFButtonShape.pills - ? this.width + 6 - : this.width, + height: widget.shape == GFIconButtonShape.circle ? this.height + 6 : this.height, + width: widget.shape == GFIconButtonShape.pills ? this.width + 10 : widget.shape == GFIconButtonShape.circle ? this.height + 6 : this.width, decoration: getBoxShadow(), child: Material( shape: widget.type == GFType.transparent ? null : widget.borderShape == null ? shape : widget.borderShape, - color: widget.type == GFType.transparent || - widget.type == GFType.outline - ? Colors.transparent - : this.color, + color: widget.onPressed != null ? getColor() : getDisabledFillColor(), type: widget.type == GFType.transparent ? MaterialType.transparency : MaterialType.button, diff --git a/lib/components/button/gf_social_button.dart b/lib/components/button/gf_social_button.dart new file mode 100644 index 00000000..406247e7 --- /dev/null +++ b/lib/components/button/gf_social_button.dart @@ -0,0 +1,274 @@ +import 'dart:math' as math; +import 'package:flutter/foundation.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:ui_kit/components/button/gf_button.dart'; +import 'package:ui_kit/shape/gf_button_shape.dart'; +import 'package:ui_kit/size/gf_size.dart'; +import 'package:ui_kit/types/gf_type.dart'; +import 'package:ui_kit/position/gf_position.dart'; +import 'package:ui_kit/colors/gf_color.dart'; + +class GFSocialButton extends GFButton{ + /// Called when the button is tapped or otherwise activated. + final VoidCallback onPressed; + + /// Called by the underlying [InkWell] widget's [InkWell.onHighlightChanged] callback. + final ValueChanged onHighlightChanged; + + /// Defines the default text style, with [Material.textStyle], for the button's [child]. + final TextStyle textStyle; + + /// The border side for the button's [Material]. + final BorderSide borderSide; + + /// The box shadow for the button's [Material]. + final BoxShadow boxShadow; + + /// Pass [GFColor] or [Color]. The color for the button's [Material] when it has the input focus. + final dynamic focusColor; + + /// Pass [GFColor] or [Color]. The color for the button's [Material] when a pointer is hovering over it. + final dynamic hoverColor; + + /// Pass [GFColor] or [Color]. The highlight color for the button's [InkWell]. + final dynamic highlightColor; + + /// Pass [GFColor] or [Color]. The splash color for the button's [InkWell]. + final dynamic splashColor; + + /// The elevation for the button's [Material] when the button is [enabled] but not pressed. + final double elevation; + + /// The elevation for the button's [Material] when the button is [enabled] and a pointer is hovering over it. + final double hoverElevation; + + /// The elevation for the button's [Material] when the button is [enabled] and has the input focus. + final double focusElevation; + + /// The elevation for the button's [Material] when the button is [enabled] and pressed. + final double highlightElevation; + + /// The elevation for the button's [Material] when the button is not [enabled]. + final double disabledElevation; + + /// The internal padding for the button's [child]. + final EdgeInsetsGeometry padding; + + /// Defines the button's size. + final BoxConstraints constraints; + + /// The shape of the button's [Material]. + final ShapeBorder borderShape; + + /// Defines the duration of animated changes for [shape] and [elevation]. + final Duration animationDuration; + + /// Typically the button's label. + final Widget child; + + /// Whether the button is enabled or disabled. + bool get enabled => onPressed != null; + + /// Configures the minimum size of the tap target. + final MaterialTapTargetSize materialTapTargetSize; + + /// {@macro flutter.widgets.Focus.focusNode} + final FocusNode focusNode; + + /// {@macro flutter.widgets.Focus.autofocus} + final bool autofocus; + + /// {@macro flutter.widgets.Clip} + final Clip clipBehavior; + + /// Button type of [GFType] i.e, solid, outline, outline2x, transparent + final GFType type; + + /// Button type of [GFSocialButtonShape] i.e, standard, pills, square, shadow, icons + final GFButtonShape shape; + + /// Pass [GFColor] or [Color] + final dynamic color; + + /// The fill color of the button when the button is disabled. + /// + /// The default value of this color is the theme's disabled color, + /// [ThemeData.disabledColor]. + /// + /// See also: + /// + /// * [color] - the fill color of the button when the button is [enabled]. + final dynamic disabledColor; + + /// Pass [GFColor] or [Color] + final dynamic textColor; + + /// The color to use for this button's text when the button is disabled. + /// + /// The button's [Material.textStyle] will be the current theme's button + /// text style, [ThemeData.textTheme.button], configured with this color. + /// + /// The default value is the theme's disabled color, + /// [ThemeData.disabledColor]. + /// + /// If [textColor] is a [MaterialStateProperty], [disabledTextColor] + /// will be ignored. + /// + /// See also: + /// + /// * [textColor] - The color to use for this button's text when the button is [enabled]. + final dynamic disabledTextColor; + + /// size of [double] or [GFSize] i.e, 1.2, small, medium, large etc. + final dynamic size; + + /// text of type [String] is alternative to child. text will get priority over child + final String text; + + /// icon of type [Widget] + final Widget icon; + + /// icon type of [GFIconPosition] i.e, start, end + final GFPosition position; + + /// on true state blockButton gives block size button + final bool blockButton; + + /// on true state full width Button gives full width button + final bool fullWidthButton; + + /// on true state default box shadow appears around button + final bool buttonBoxShadow; + + /// A set of thirteen colors that can be used to derive the button theme's + /// colors. + /// + /// This property was added much later than the theme's set of highly + /// specific colors, like [ThemeData.buttonColor], [ThemeData.highlightColor], + /// [ThemeData.splashColor] etc. + /// + /// The colors for new button classes can be defined exclusively in terms + /// of [colorScheme]. When it's possible, the existing buttons will + /// (continue to) gradually migrate to it. + final ColorScheme colorScheme; + + /// Whether detected gestures should provide acoustic and/or haptic feedback. + /// + /// For example, on Android a tap will produce a clicking sound and a + /// long-press will produce a short vibration, when feedback is enabled. + /// + /// See also: + /// + /// * [Feedback] for providing platform-specific feedback to certain actions. + final bool enableFeedback; + + /// Called when the button is long-pressed. + /// + /// If this callback and [onPressed] are null, then the button will be disabled. + /// + /// See also: + /// + /// * [enabled], which is true if the button is enabled. + final VoidCallback onLongPress; + + /// Create buttons of all types. check out [GFIconButton] for icon buttons, and [GFBadge] for badges + const GFSocialButton( + {Key key, + @required this.onPressed, + this.onHighlightChanged, + this.textStyle, + this.boxShadow, + this.buttonBoxShadow, + this.focusColor, + this.hoverColor, + this.highlightColor, + this.splashColor, + this.elevation = 0.0, + this.focusElevation = 4.0, + this.hoverElevation = 4.0, + this.highlightElevation = 1.0, + this.disabledElevation = 0.0, + this.padding = const EdgeInsets.symmetric(horizontal: 8.0), + this.constraints, + this.borderShape, + this.animationDuration = kThemeChangeDuration, + this.clipBehavior = Clip.none, + this.focusNode, + this.autofocus = false, + MaterialTapTargetSize materialTapTargetSize, + this.child, + this.type = GFType.solid, + this.shape = GFButtonShape.standard, + this.color = GFColor.primary, + this.textColor, + this.position = GFPosition.start, + this.size = GFSize.medium, + this.borderSide, + this.text, + this.icon, + this.blockButton, + this.fullWidthButton, + this.colorScheme, + this.enableFeedback, + this.onLongPress, + this.disabledColor, + this.disabledTextColor, + }) + : materialTapTargetSize = + materialTapTargetSize ?? MaterialTapTargetSize.padded, + assert(shape != null, 'Button shape can not be null'), +// assert(elevation != null && elevation >= 0.0), + assert(focusElevation != null && focusElevation >= 0.0), + assert(hoverElevation != null && hoverElevation >= 0.0), + assert(highlightElevation != null && highlightElevation >= 0.0), + assert(disabledElevation != null && disabledElevation >= 0.0), + assert(padding != null), + assert(animationDuration != null), + assert(clipBehavior != null), + assert(autofocus != null); + + @override + Widget build(BuildContext context) { + return GFButton( + onPressed: onPressed, + onHighlightChanged: onHighlightChanged, + textStyle: textStyle, + boxShadow: boxShadow, + buttonBoxShadow: buttonBoxShadow, + focusColor: focusColor, + hoverColor: hoverColor, + highlightColor: highlightColor, + splashColor: splashColor, + elevation: elevation, + focusElevation: focusElevation, + hoverElevation: hoverElevation, + highlightElevation:highlightElevation, + disabledElevation: disabledElevation, + constraints: constraints, + borderShape: borderShape, + animationDuration: animationDuration, + clipBehavior: clipBehavior, + focusNode: focusNode, + autofocus : autofocus , + child: child, + type :GFType.solid, + shape :GFButtonShape.standard, + color :GFColor.primary, + textColor: textColor, + position :GFPosition.start, + size :GFSize.medium, + borderSide: borderSide, + text: text, + icon: icon, + blockButton: blockButton, + fullWidthButton: fullWidthButton, + disabledColor: disabledTextColor, + disabledTextColor: disabledColor, + ); + } +} + + diff --git a/lib/components/card/gf_card.dart b/lib/components/card/gf_card.dart index a99df63d..c5de141c 100644 --- a/lib/components/card/gf_card.dart +++ b/lib/components/card/gf_card.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:ui_kit/components/button_bar/gf_button_bar.dart'; +import 'package:ui_kit/components/button/gf_button_bar.dart'; import 'package:ui_kit/components/list_tile/gf_list_tile.dart'; import 'package:ui_kit/components/image/gf_image_overlay.dart'; import 'package:ui_kit/position/gf_position.dart'; @@ -15,7 +15,7 @@ class GFCard extends StatelessWidget { this.elevation, this.shape, this.borderOnForeground = true, - this.padding = const EdgeInsets.all(12.0), + this.padding = const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), this.margin, this.clipBehavior, this.semanticContainer, @@ -54,7 +54,7 @@ class GFCard extends StatelessWidget { /// The empty space that surrounds the card. Defines the card's outer [Container.margin]. final EdgeInsetsGeometry margin; - /// The empty space that surrounds the card. Defines the card's outer [Container.margin].. + /// The empty space that surrounds the card. Defines the card's outer [Container.padding].. final EdgeInsetsGeometry padding; /// Whether this widget represents a single semantic container, or if false diff --git a/lib/components/slider/gf_slider.dart b/lib/components/carousel/gf_carousel.dart similarity index 94% rename from lib/components/slider/gf_slider.dart rename to lib/components/carousel/gf_carousel.dart index 52304775..3186c24e 100644 --- a/lib/components/slider/gf_slider.dart +++ b/lib/components/carousel/gf_carousel.dart @@ -9,8 +9,8 @@ List map(List list, Function handler) { return result; } -class GFSlider extends StatefulWidget { - GFSlider( +class GFCarousel extends StatefulWidget { + GFCarousel( {@required this.items, this.pagerSize, this.passiveIndicator, @@ -31,7 +31,6 @@ class GFSlider extends StatefulWidget { this.enlargeMainPage = false, this.onPageChanged, this.scrollPhysics, - this.rowCount, this.scrollDirection: Axis.horizontal}) : this.realPage = enableInfiniteScroll ? realPage + initialPage : initialPage, @@ -41,8 +40,6 @@ class GFSlider extends StatefulWidget { enableInfiniteScroll ? realPage + initialPage : initialPage, ); - /// Count of visible cells - final int rowCount; /// The pagination dots size can be defined using [double]. final double pagerSize; @@ -53,7 +50,7 @@ class GFSlider extends StatefulWidget { /// The slider pagination's passive color. final Color passiveIndicator; - /// The [GFSlider] shows pagination on state true. + /// The [GFCarousel] shows pagination on state true. final bool pagination; /// The widgets to be shown as sliders. @@ -68,7 +65,7 @@ class GFSlider extends StatefulWidget { /// The fraction of the viewport that each page should occupy. Defaults to 0.8, which means each page fills 80% of the slide. final num viewportFraction; - /// The initial page to show when first creating the [GFSlider]. Defaults to 0. + /// The initial page to show when first creating the [GFCarousel]. Defaults to 0. final num initialPage; /// The actual index of the [PageView]. @@ -120,7 +117,7 @@ class GFSlider extends StatefulWidget { /// and can be used to control the [PageView] it is passed to. final PageController pageController; - /// Animates the controlled [GFSlider] to the next page. + /// Animates the controlled [GFCarousel] to the next page. /// /// The animation lasts for the given duration and follows the given curve. /// The returned [Future] resolves when the animation completes. @@ -128,7 +125,7 @@ class GFSlider extends StatefulWidget { return pageController.nextPage(duration: duration, curve: curve); } - /// Animates the controlled [GFSlider] to the previous page. + /// Animates the controlled [GFCarousel] to the previous page. /// /// The animation lasts for the given duration and follows the given curve. /// The returned [Future] resolves when the animation completes. @@ -136,7 +133,7 @@ class GFSlider extends StatefulWidget { return pageController.previousPage(duration: duration, curve: curve); } - /// Changes which page is displayed in the controlled [GFSlider]. + /// Changes which page is displayed in the controlled [GFCarousel]. /// /// Jumps the page position from its current value to the given value, /// without animation, and without checking if the new value is in range. @@ -147,7 +144,7 @@ class GFSlider extends StatefulWidget { .jumpToPage(pageController.page.toInt() + page - index); } - /// Animates the controlled [GFSlider] from the current page to the given page. + /// Animates the controlled [GFCarousel] from the current page to the given page. /// /// The animation lasts for the given duration and follows the given curve. /// The returned [Future] resolves when the animation completes. @@ -161,10 +158,10 @@ class GFSlider extends StatefulWidget { } @override - _GFSliderState createState() => _GFSliderState(); + _GFCarouselState createState() => _GFCarouselState(); } -class _GFSliderState extends State with TickerProviderStateMixin { +class _GFCarouselState extends State with TickerProviderStateMixin { Timer timer; /// Size of cell diff --git a/lib/components/slider/gf_items_slider.dart b/lib/components/carousel/gf_items_carousel.dart similarity index 90% rename from lib/components/slider/gf_items_slider.dart rename to lib/components/carousel/gf_items_carousel.dart index e54d32d1..8a55b837 100644 --- a/lib/components/slider/gf_items_slider.dart +++ b/lib/components/carousel/gf_items_carousel.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; /// /// The `details` object provides the position of the touch when it first /// touched the surface. -typedef GFItemsSliderSlideStartCallback = void Function( +typedef GFItemsCarouselSlideStartCallback = void Function( DragStartDetails details); /// Signature for when a pointer that is in contact with the screen and moving @@ -16,14 +16,14 @@ typedef GFItemsSliderSlideStartCallback = void Function( /// /// The `details` object provides the position of the touch and the distance it /// has travelled since the last update. -typedef GFItemsSliderSlideCallback = void Function(DragUpdateDetails details); +typedef GFItemsCarouselSlideCallback = void Function(DragUpdateDetails details); /// Signature for when a pointer that was previously in contact with the screen /// and moving is no longer in contact with the screen. /// /// The velocity at which the pointer was moving when it stopped contacting /// the screen is available in the `details`. -typedef GFItemsSliderSlideEndCallback = void Function(DragEndDetails details); +typedef GFItemsCarouselSlideEndCallback = void Function(DragEndDetails details); /// A widget that show draggable cells with animation. /// @@ -32,24 +32,24 @@ typedef GFItemsSliderSlideEndCallback = void Function(DragEndDetails details); /// Set drag handlers [onSlideStart], [onSlide], [onSlideEnd] /// /// Set left/right arrows [leftArrow], [rightArrow] -class GFItemsSlider extends StatefulWidget { +class GFItemsCarousel extends StatefulWidget { /// Count of visible cells final int rowCount; final List children; /// Signature for when a pointer has contacted the screen and has begun to move. - final GFItemsSliderSlideStartCallback onSlideStart; + final GFItemsCarouselSlideStartCallback onSlideStart; /// Signature for when a pointer that is in contact with the screen and moving /// has moved again. - final GFItemsSliderSlideCallback onSlide; + final GFItemsCarouselSlideCallback onSlide; /// Signature for when a pointer that was previously in contact with the screen /// and moving is no longer in contact with the screen. - final GFItemsSliderSlideEndCallback onSlideEnd; + final GFItemsCarouselSlideEndCallback onSlideEnd; - GFItemsSlider( + GFItemsCarousel( {this.rowCount, this.children, this.onSlideStart, @@ -57,10 +57,10 @@ class GFItemsSlider extends StatefulWidget { this.onSlideEnd}); @override - _GFItemsSliderState createState() => new _GFItemsSliderState(); + _GFItemsCarouselState createState() => new _GFItemsCarouselState(); } -class _GFItemsSliderState extends State +class _GFItemsCarouselState extends State with TickerProviderStateMixin { /// In milliseconds static final int dragAnimationDuration = 1000; diff --git a/lib/components/image/gf_image_overlay.dart b/lib/components/image/gf_image_overlay.dart index 9733d742..d41b24af 100644 --- a/lib/components/image/gf_image_overlay.dart +++ b/lib/components/image/gf_image_overlay.dart @@ -62,7 +62,7 @@ class GFImageOverlay extends StatelessWidget { Widget build(BuildContext context) { return Container( alignment: alignment, - height: height ?? MediaQuery.of(context).size.height * 0.3, + height: height, width: width ?? MediaQuery.of(context).size.width, margin: margin, padding: padding, diff --git a/lib/components/list_tile/gf_list_tile.dart b/lib/components/list_tile/gf_list_tile.dart index 4f3df6f4..3062478a 100644 --- a/lib/components/list_tile/gf_list_tile.dart +++ b/lib/components/list_tile/gf_list_tile.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/avatar/gf_avatar.dart'; class GFListTile extends StatelessWidget { @@ -18,48 +19,125 @@ class GFListTile extends StatelessWidget { /// The descriprion to display inside the [GFListTile]. see [Text] final Widget description; + /// The descriprion to display inside the [GFListTile]. see [Text] + final Widget trailing; + /// The icon to display inside the [GFListTile]. see [Icon] final Widget icon; ///type of [bool] corresponds to true or false to show or hide the divider final bool showDivider; + /// The empty space that surrounds the card. Defines the card's outer [Container.margin].. + final EdgeInsetsGeometry padding; + + /// The divider's height extent. + /// + /// The divider itself is always drawn as a horizontal line that is centered + /// within the height specified by this value. + /// + /// If this is null, then the [DividerThemeData.space] is used. If that is + /// also null, then this defaults to 16.0. + final double dividerHeight; + + /// The thickness of the line drawn within the divider. + /// + /// A divider with a [thickness] of 0.0 is always drawn as a line with a + /// height of exactly one device pixel. + /// + /// If this is null, then the [DividerThemeData.dividerThickness] is used. If + /// that is also null, then this defaults to 0.0. + final double dividerThickness; + + /// The amount of empty space to the leading edge of the divider. + /// + /// If this is null, then the [DividerThemeData.indent] is used. If that is + /// also null, then this defaults to 0.0. + final double dividerIndent; + + /// The amount of empty space to the trailing edge of the divider. + /// + /// If this is null, then the [DividerThemeData.endIndent] is used. If that is + /// also null, then this defaults to 0.0. + final double dividerEndIndent; + + /// The color to use when painting the line. + /// + /// If this is null, then the [DividerThemeData.color] is used. If that is + /// also null, then [ThemeData.dividerColor] is used. + /// + /// {@tool sample} + /// + /// ```dart + /// Divider( + /// color: Colors.deepOrange, + /// ) + /// ``` + /// {@end-tool} + final Color dividerColor; + const GFListTile( {Key key, this.color, this.avatar, this.title, - this.subTitle , - this.description , + this.subTitle, + this.description, this.icon, - this.showDivider = true - }) + this.showDivider = true, + this.padding, + this.trailing, + this.dividerEndIndent, + this.dividerHeight, + this.dividerIndent, + this.dividerThickness, + this.dividerColor}) : super(key: key); @override Widget build(BuildContext context) { + final double height = this.dividerHeight ?? 16.0; + final double thickness = this.dividerThickness ?? 0.0; + final double indent = this.dividerIndent ?? 0.0; + final double endIndent = this.dividerEndIndent ?? 0.0; + return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - ListTile( - leading: avatar, - title: title, - subtitle: subTitle != null || description != null ? Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - subTitle ?? Container(), - description ?? Container() - ], - ): null, - trailing: icon != null ? Column( - children: [ - Padding(padding: EdgeInsets.only(top: description != null ? 0.0 : 8.0), child: - icon ) - ], - ): null + Container( + margin: padding, + color: color, + child: ListTile( + leading: avatar, + title: title, + subtitle: subTitle != null || description != null + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + subTitle ?? Container(), + description ?? Container() + ], + ) + : null, + trailing: icon != null + ? Column( + children: [ + Padding( + padding: EdgeInsets.only(top: 16.0), child: icon) + ], + ) + : null), ), - showDivider ? Divider() : Container() + showDivider + ? Divider( + height: height ?? dividerHeight, + thickness: thickness ?? dividerThickness, + color: dividerColor ?? Theme.of(context).dividerColor, + indent: indent ?? dividerIndent, + endIndent: endIndent ?? dividerEndIndent, + ) + : Container() ], ); } -} \ No newline at end of file +} diff --git a/lib/components/segment_tabs/gf_segment_tabs.dart b/lib/components/tabs/gf_segment_tabs.dart similarity index 88% rename from lib/components/segment_tabs/gf_segment_tabs.dart rename to lib/components/tabs/gf_segment_tabs.dart index 06b98a34..93039dd3 100644 --- a/lib/components/segment_tabs/gf_segment_tabs.dart +++ b/lib/components/tabs/gf_segment_tabs.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; +import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; @@ -165,29 +166,29 @@ class _GFSegmentTabsState extends State { height: widget.height == null ? 28.0 : widget.height, width: widget.width == null ? 240.0 : widget.width, decoration: BoxDecoration( - border: widget.border == null ? Border.all(color: Colors.black26, width: 2.0) : widget.border, - borderRadius: widget.borderRadius == null ? BorderRadius.circular(8.0) : widget.borderRadius, + border: widget.border == null ? Border.all(color: getGFColor(GFColor.primary), width:1.0) : widget.border, + borderRadius: widget.borderRadius == null ? BorderRadius.circular(2.0) : widget.borderRadius, ), child: DefaultTabController( initialIndex: widget.initialIndex, length: widget.length, child: Material( - borderRadius: widget.borderRadius == null ? BorderRadius.circular(8.0) : widget.borderRadius, + borderRadius: widget.borderRadius == null ? BorderRadius.circular(2.0) : widget.borderRadius, type: MaterialType.button, color: widget.tabBarColor ?? Colors.transparent, child: TabBar( controller: widget.tabController, - labelColor: widget.labelColor, - unselectedLabelColor: widget.unselectedLabelColor, - labelStyle: widget.labelStyle, - unselectedLabelStyle: widget.unselectedLabelStyle, - indicatorColor: widget.indicatorColor == null ? Colors.blueGrey : widget.indicatorColor, + labelColor: widget.labelColor ?? getGFColor(GFColor.white), + unselectedLabelColor: widget.unselectedLabelColor ?? getGFColor(GFColor.primary), + labelStyle: widget.labelStyle ?? TextStyle(fontSize: 12.0), + unselectedLabelStyle: widget.unselectedLabelStyle ?? TextStyle(fontSize: 12.0), + indicatorColor: widget.indicatorColor == null ? getGFColor(GFColor.primary) : widget.indicatorColor, indicatorSize: widget.indicatorSize, indicator: widget.indicator == null ? BoxDecoration( - color: widget.indicatorColor == null ? Colors.blueGrey : widget.indicatorColor, - border: Border.all(color: widget.indicatorColor == null ? Colors.blueGrey : widget.indicatorColor, width: 2.0), - borderRadius: widget.borderRadius == null ? BorderRadius.circular(6.0) : widget.borderRadius, + color: widget.indicatorColor == null ? getGFColor(GFColor.primary) : widget.indicatorColor, + border: Border.all(color: widget.indicatorColor == null ? Colors.transparent : widget.indicatorColor, width: 2.0), + borderRadius: widget.borderRadius == null ? BorderRadius.circular(0.0) : widget.borderRadius, ) : widget.indicator, indicatorPadding: widget.indicatorPadding, indicatorWeight: widget.indicatorWeight, diff --git a/lib/components/tabs/gf_tabBar.dart b/lib/components/tabs/gf_tabBar.dart new file mode 100644 index 00000000..80bb68f3 --- /dev/null +++ b/lib/components/tabs/gf_tabBar.dart @@ -0,0 +1,196 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter/widgets.dart'; +import 'package:ui_kit/colors/gf_color.dart'; +import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; + +class GFTabBar extends StatefulWidget { + GFTabBar({ + Key key, + this.initialIndex = 0, + @required this.length, + this.tabBarHeight, + this.tabBarColor, + this.indicatorColor, + this.indicatorWeight = 2.0, + this.indicatorPadding = EdgeInsets.zero, + this.indicator, + this.indicatorSize, + this.labelColor, + this.labelStyle, + this.labelPadding, + this.unselectedLabelColor, + this.unselectedLabelStyle, + this.tabBarView, + this.tabs, + this.controller, + }): + assert(length != null && length >= 0), + assert(initialIndex != null && initialIndex >= 0 && (length == 0 || initialIndex < length)); + + /// The initial index of the selected tab. Defaults to zero. + final int initialIndex; + + /// The total number of tabs. Typically greater than one. Must match [TabBar.tabs]'s and + /// [TabBarView.children]'s length. + final int length; + + /// Sets [GFTabBar] height + final double tabBarHeight; + + /// Sets [TabBar] color using material color [Color] + final Color tabBarColor; + + /// The color of the line that appears below the selected tab. + /// + /// If this parameter is null, then the value of the Theme's indicatorColor + /// property is used. + /// + /// If [indicator] is specified, this property is ignored. + final Color indicatorColor; + + /// The thickness of the line that appears below the selected tab. + /// + /// The value of this parameter must be greater than zero and its default + /// value is 2.0. + /// + /// If [indicator] is specified, this property is ignored. + final double indicatorWeight; + + /// The horizontal padding for the line that appears below the selected tab. + /// + /// For [isScrollable] tab bars, specifying [kTabLabelPadding] will align + /// the indicator with the tab's text for [Tab] widgets and all but the + /// shortest [Tab.text] values. + /// + /// The [EdgeInsets.top] and [EdgeInsets.bottom] values of the + /// [indicatorPadding] are ignored. + /// + /// The default value of [indicatorPadding] is [EdgeInsets.zero]. + /// + /// If [indicator] is specified, this property is ignored. + final EdgeInsetsGeometry indicatorPadding; + + /// Defines the appearance of the selected tab indicator. + /// + /// If [indicator] is specified, the [indicatorColor], [indicatorWeight], + /// and [indicatorPadding] properties are ignored. + /// + /// The default, underline-style, selected tab indicator can be defined with + /// [UnderlineTabIndicator]. + /// + /// The indicator's size is based on the tab's bounds. If [indicatorSize] + /// is [TabBarIndicatorSize.tab] the tab's bounds are as wide as the space + /// occupied by the tab in the tab bar. If [indicatorSize] is + /// [TabBarIndicatorSize.label], then the tab's bounds are only as wide as + /// the tab widget itself. + final Decoration indicator; + + /// Defines how the selected tab indicator's size is computed. + /// + /// The size of the selected tab indicator is defined relative to the + /// tab's overall bounds if [indicatorSize] is [TabBarIndicatorSize.tab] + /// (the default) or relative to the bounds of the tab's widget if + /// [indicatorSize] is [TabBarIndicatorSize.label]. + /// + /// The selected tab's location appearance can be refined further with + /// the [indicatorColor], [indicatorWeight], [indicatorPadding], and + /// [indicator] properties. + final TabBarIndicatorSize indicatorSize; + + /// The color of selected tab labels. + /// + /// Unselected tab labels are rendered with the same color rendered at 70% + /// opacity unless [unselectedLabelColor] is non-null. + /// + /// If this parameter is null, then the color of the [ThemeData.primaryTextTheme]'s + /// body2 text color is used. + final Color labelColor; + + /// The color of unselected tab labels. + /// + /// If this property is null, unselected tab labels are rendered with the + /// [labelColor] with 70% opacity. + final Color unselectedLabelColor; + + /// The text style of the selected tab labels. + /// + /// If [unselectedLabelStyle] is null, then this text style will be used for + /// both selected and unselected label styles. + /// + /// If this property is null, then the text style of the + /// [ThemeData.primaryTextTheme]'s body2 definition is used. + final TextStyle labelStyle; + + /// The padding added to each of the tab labels. + /// + /// If this property is null, then kTabLabelPadding is used. + final EdgeInsetsGeometry labelPadding; + + /// The text style of the unselected tab labels + /// + /// If this property is null, then the [labelStyle] value is used. If [labelStyle] + /// is null, then the text style of the [ThemeData.primaryTextTheme]'s + /// body2 definition is used. + final TextStyle unselectedLabelStyle; + + /// One widget per tab. + /// Its length must match the length of the [GFTabBar.tabs] + /// list, as well as the [controller]'s [GFTabBar.length]. + final GFTabBarView tabBarView; + + /// Typically a list of two or more [Tab] widgets. + /// + /// The length of this list must match the [controller]'s [TabController.length] + /// and the length of the [TabBarView.children] list. + final List tabs; + + final TabController controller; + + @override + _GFTabBarState createState() => _GFTabBarState(); +} + +class _GFTabBarState extends State { + @override + Widget build(BuildContext context) { + return Container( + height: widget.tabBarHeight == null ? MediaQuery.of(context).size.height * 0.1 : widget.tabBarHeight, + child: Material( + type: MaterialType.button, + color: widget.tabBarColor ?? getGFColor(GFColor.primary), + child: TabBar( + controller: widget.controller, + labelColor: widget.labelColor, + unselectedLabelColor: widget.unselectedLabelColor, + labelStyle: widget.labelStyle, + unselectedLabelStyle: widget.unselectedLabelStyle, + indicatorColor: widget.indicatorColor, + indicatorSize: widget.indicatorSize, + indicator: widget.indicator, + indicatorPadding: widget.indicatorPadding, + indicatorWeight: widget.indicatorWeight, + tabs: widget.tabs, + ), + ), + ); + } +} + + + + + + + + + + + + + + + + + diff --git a/lib/components/tabs/gf_tabBarView.dart b/lib/components/tabs/gf_tabBarView.dart index 86886f4f..88bf9beb 100644 --- a/lib/components/tabs/gf_tabBarView.dart +++ b/lib/components/tabs/gf_tabBarView.dart @@ -25,6 +25,7 @@ class GFTabBarView extends StatefulWidget { @required this.children, this.controller, this.physics, + this.height, this.dragStartBehavior = DragStartBehavior.start, }) : assert(children != null), assert(dragStartBehavior != null), @@ -56,6 +57,9 @@ class GFTabBarView extends StatefulWidget { /// {@macro flutter.widgets.scrollable.dragStartBehavior} final DragStartBehavior dragStartBehavior; + /// [GFTabBarView] height can be fixed using [double] + final double height; + @override _GFTabBarViewState createState() => _GFTabBarViewState(); } @@ -223,11 +227,14 @@ class _GFTabBarViewState extends State { }()); return NotificationListener( onNotification: _handleScrollNotification, - child: PageView( - dragStartBehavior: widget.dragStartBehavior, - controller: _pageController, - physics: widget.physics == null ? _kGFTabBarViewPhysics : _kGFTabBarViewPhysics.applyTo(widget.physics), - children: _childrenWithKey, + child: Container( + height: widget.height == null ? MediaQuery.of(context).size.height : widget.height, + child: PageView( + dragStartBehavior: widget.dragStartBehavior, + controller: _pageController, + physics: widget.physics == null ? _kGFTabBarViewPhysics : _kGFTabBarViewPhysics.applyTo(widget.physics), + children: _childrenWithKey, + ), ), ); } diff --git a/lib/components/tabs/gf_tabs.dart b/lib/components/tabs/gf_tabs.dart index b1e17584..d588e6b7 100644 --- a/lib/components/tabs/gf_tabs.dart +++ b/lib/components/tabs/gf_tabs.dart @@ -2,7 +2,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; +import 'package:ui_kit/colors/gf_color.dart'; import 'package:ui_kit/components/tabs/gf_tabBarView.dart'; +import 'package:ui_kit/components/tabs/gf_tabBar.dart'; class GFTabs extends StatefulWidget { GFTabs({ @@ -23,6 +25,8 @@ class GFTabs extends StatefulWidget { this.unselectedLabelStyle, this.tabBarView, this.tabs, + this.controller, + this.tabBarHeight, }): assert(length != null && length >= 0), assert(initialIndex != null && initialIndex >= 0 && (length == 0 || initialIndex < length)); @@ -144,6 +148,10 @@ class GFTabs extends StatefulWidget { /// and the length of the [TabBarView.children] list. final List tabs; + final TabController controller; + + final double tabBarHeight; + @override _GFTabsState createState() => _GFTabsState(); } @@ -159,21 +167,22 @@ class _GFTabsState extends State { height: widget.height == null ? MediaQuery.of(context).size.height * 0.5 : widget.height, child: Column( children: [ - Material( - type: MaterialType.button, - color: widget.tabBarColor ?? Theme.of(context).primaryColor, - child: TabBar( - labelColor: widget.labelColor, - unselectedLabelColor: widget.unselectedLabelColor, - labelStyle: widget.labelStyle, - unselectedLabelStyle: widget.unselectedLabelStyle, - indicatorColor: widget.indicatorColor, - indicatorSize: widget.indicatorSize, - indicator: widget.indicator, - indicatorPadding: widget.indicatorPadding, - indicatorWeight: widget.indicatorWeight, - tabs: widget.tabs, - ), + GFTabBar( + length: widget.length, + initialIndex: widget.initialIndex, + tabBarHeight: widget.tabBarHeight, + tabBarColor: widget.tabBarColor ?? getGFColor(GFColor.primary), + controller: widget.controller, + labelColor: widget.labelColor, + unselectedLabelColor: widget.unselectedLabelColor, + labelStyle: widget.labelStyle, + unselectedLabelStyle: widget.unselectedLabelStyle, + indicatorColor: widget.indicatorColor, + indicatorSize: widget.indicatorSize, + indicator: widget.indicator, + indicatorPadding: widget.indicatorPadding, + indicatorWeight: widget.indicatorWeight, + tabs: widget.tabs, ), Expanded( child: widget.tabBarView diff --git a/lib/components/header/gf_header.dart b/lib/components/typography/gf_typography.dart similarity index 86% rename from lib/components/header/gf_header.dart rename to lib/components/typography/gf_typography.dart index 7dddbdd6..389112db 100644 --- a/lib/components/header/gf_header.dart +++ b/lib/components/typography/gf_typography.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; import 'package:ui_kit/colors/gf_color.dart'; -import 'package:ui_kit/types/gf_heading_type.dart'; +import 'package:ui_kit/types/gf_typography_type.dart'; -class GFHeader extends StatelessWidget { - const GFHeader( +class GFTypography extends StatelessWidget { + const GFTypography( {Key key, - this.type = GFHeadingType.typo4, + this.type = GFTypographyType.typo4, this.child, this.text, this.icon, @@ -49,32 +49,32 @@ class GFHeader extends StatelessWidget { ///pass [double] type to increase or decrease the width of the divider final double dividerWidth; - ///backgroundImage of type [ImageProvider] to set the background of [GFHeader] + ///backgroundImage of type [ImageProvider] to set the background of [GFTypography] final ImageProvider backgroundImage; - ///backgroundImagecolorFilter of type [ColorFilter] to set the background color of [GFHeader] only when backgroundImage is available + ///backgroundImagecolorFilter of type [ColorFilter] to set the background color of [GFTypography] only when backgroundImage is available final ColorFilter backgroundImagecolorFilter; - /// header type of [GFHeaderType] i.e, typo1, typo2, typo3, typo4, typo5, typo6 - final GFHeadingType type; + /// header type of [GFTypographyType] i.e, typo1, typo2, typo3, typo4, typo5, typo6 + final GFTypographyType type; @override Widget build(BuildContext context) { double fontSize; - if(type == GFHeadingType.typo1){ + if(type == GFTypographyType.typo1){ fontSize = 25.0; - }else if(type == GFHeadingType.typo2){ + }else if(type == GFTypographyType.typo2){ fontSize = 22.0; - }else if (type == GFHeadingType.typo3){ + }else if (type == GFTypographyType.typo3){ fontSize = 19.0; - }else if(type == GFHeadingType.typo4){ + }else if(type == GFTypographyType.typo4){ fontSize = 17.0; - }else if (type == GFHeadingType.typo5){ + }else if (type == GFTypographyType.typo5){ fontSize = 15.0; - }else if(type == GFHeadingType.typo6){ + }else if(type == GFTypographyType.typo6){ fontSize = 13.0; } diff --git a/lib/shape/gf_icon_button_shape.dart b/lib/shape/gf_icon_button_shape.dart new file mode 100644 index 00000000..c6633dbc --- /dev/null +++ b/lib/shape/gf_icon_button_shape.dart @@ -0,0 +1 @@ +enum GFIconButtonShape { standard, pills, square, circle } \ No newline at end of file diff --git a/lib/size/gf_size.dart b/lib/size/gf_size.dart index e254a5f1..f5d36f1c 100644 --- a/lib/size/gf_size.dart +++ b/lib/size/gf_size.dart @@ -1,9 +1,9 @@ enum GFSize { small, medium, large } -const double SMALL = 35.0; -const double MEDIUM = 50.0; -const double LARGE = 65.0; -const double BLOCK = 40.0; +const double SMALL = 30.0; +const double MEDIUM = 35.0; +const double LARGE = 40.0; +//const double BLOCK = 40.0; /// Pass [GFSize] or [double] double getGFSize(dynamic size) { diff --git a/lib/types/gf_heading_type.dart b/lib/types/gf_heading_type.dart deleted file mode 100644 index 23d7cdc6..00000000 --- a/lib/types/gf_heading_type.dart +++ /dev/null @@ -1 +0,0 @@ -enum GFHeadingType { typo1, typo2, typo3, typo4, typo5, typo6 } \ No newline at end of file diff --git a/lib/types/gf_type.dart b/lib/types/gf_type.dart index 4c81df0d..1a40249c 100644 --- a/lib/types/gf_type.dart +++ b/lib/types/gf_type.dart @@ -1 +1 @@ -enum GFType { solid, outline, transparent } +enum GFType { solid, outline, outline2x, transparent } diff --git a/lib/types/gf_typography_type.dart b/lib/types/gf_typography_type.dart new file mode 100644 index 00000000..ddcd579d --- /dev/null +++ b/lib/types/gf_typography_type.dart @@ -0,0 +1 @@ +enum GFTypographyType { typo1, typo2, typo3, typo4, typo5, typo6 } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 210e5914..72d09fbf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,3 +16,4 @@ dev_dependencies: sdk: flutter flutter: + uses-material-design: true