-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3384118
commit 979370f
Showing
15 changed files
with
135 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
// Copyright 2023 BBK Development. All rights reserved. | ||
// Use of this source code is governed by a GPL-style license that can be found | ||
// in the LICENSE file. | ||
|
||
import 'package:flutter/material.dart'; | ||
|
||
/// A class that provides constant button size values to use app-wide. | ||
abstract final class AppButtonSize { | ||
/// [small] size equals to `48.0`. | ||
static const small = kMinInteractiveDimension; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
// Copyright 2022 BBK Development. All rights reserved. | ||
// Use of this source code is governed by a GPL-style license that can be found | ||
// in the LICENSE file. | ||
|
||
/// A class that provides constant icon size values to use app-wide. | ||
abstract final class AppIconSize { | ||
/// [xxSmall] size equals to `16.0`. | ||
static const xxSmall = 16.0; | ||
|
||
/// [xSmall] size equals to `20.0`. | ||
static const xSmall = 20.0; | ||
|
||
/// [small] size equals to `24.0`. | ||
static const small = 24.0; | ||
|
||
/// [medium] size equals to `32.0`. | ||
static const medium = 32.0; | ||
|
||
/// [large] size equals to `48.0`. | ||
static const large = 48.0; | ||
|
||
/// [xLarge] size equals to `64.0`. | ||
static const xLarge = 64.0; | ||
|
||
/// [xxLarge] size equals to `96.0`. | ||
static const xxLarge = 96.0; | ||
|
||
/// [xxxLarge] size equals to `128.0`. | ||
static const xxxLarge = 128.0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
/// An enum that provides constant main color values to use app-wide. | ||
enum AppMainColor { | ||
/// [red] color value equals to `Colors.red`. | ||
red, | ||
|
||
/// [pink] color value equals to `Colors.pink`. | ||
pink, | ||
|
||
/// [purple] color value equals to `Colors.purple`. | ||
purple, | ||
|
||
/// [indigo] color value equals to `Colors.indigo`. | ||
indigo, | ||
|
||
/// [blue] color value equals to `Colors.blue`. | ||
blue, | ||
|
||
/// [cyan] color value equals to `Colors.cyan`. | ||
cyan, | ||
|
||
/// [teal] color value equals to `Colors.teal`. | ||
teal, | ||
|
||
/// [green] color value equals to `Colors.green`. | ||
green, | ||
|
||
/// [lime] color value equals to `Colors.lime`. | ||
lime, | ||
|
||
/// [yellow] color value equals to `Colors.yellow`. | ||
yellow, | ||
|
||
/// [orange] color value equals to `Colors.orange`. | ||
orange, | ||
|
||
/// [brown] color value equals to `Colors.brown`. | ||
brown; | ||
|
||
/// Returns [Color] based on the enum value. | ||
Color get value { | ||
switch (this) { | ||
case red: | ||
return Colors.red; | ||
case pink: | ||
return Colors.pink; | ||
case purple: | ||
return Colors.purple; | ||
case indigo: | ||
return Colors.indigo; | ||
case blue: | ||
return Colors.blue; | ||
case cyan: | ||
return Colors.cyan; | ||
case teal: | ||
return Colors.teal; | ||
case green: | ||
return Colors.green; | ||
case lime: | ||
return Colors.lime; | ||
case yellow: | ||
return Colors.yellow; | ||
case orange: | ||
return Colors.orange; | ||
case brown: | ||
return Colors.brown; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
// Copyright 2021 BBK Development. All rights reserved. | ||
// Use of this source code is governed by a GPL-style license that can be found | ||
// in the LICENSE file. | ||
|
||
export 'app_animation_duration.dart'; | ||
export 'app_border_radius.dart'; | ||
export 'app_button_size.dart'; | ||
export 'app_color.dart'; | ||
export 'app_icon_size.dart'; | ||
export 'app_main_color.dart'; | ||
export 'app_padding.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:vmerge/src/core/core.dart'; | ||
|
||
extension AppColorExt on AppColor { | ||
extension AppColorExt on AppMainColor { | ||
String name(BuildContext context) { | ||
return switch (this) { | ||
AppColor.red => context.l10n.red, | ||
AppColor.pink => context.l10n.pink, | ||
AppColor.purple => context.l10n.purple, | ||
AppColor.indigo => context.l10n.indigo, | ||
AppColor.blue => context.l10n.blue, | ||
AppColor.cyan => context.l10n.cyan, | ||
AppColor.teal => context.l10n.teal, | ||
AppColor.green => context.l10n.green, | ||
AppColor.lime => context.l10n.lime, | ||
AppColor.yellow => context.l10n.yellow, | ||
AppColor.orange => context.l10n.orange, | ||
AppColor.brown => context.l10n.brown, | ||
AppMainColor.red => context.l10n.red, | ||
AppMainColor.pink => context.l10n.pink, | ||
AppMainColor.purple => context.l10n.purple, | ||
AppMainColor.indigo => context.l10n.indigo, | ||
AppMainColor.blue => context.l10n.blue, | ||
AppMainColor.cyan => context.l10n.cyan, | ||
AppMainColor.teal => context.l10n.teal, | ||
AppMainColor.green => context.l10n.green, | ||
AppMainColor.lime => context.l10n.lime, | ||
AppMainColor.yellow => context.l10n.yellow, | ||
AppMainColor.orange => context.l10n.orange, | ||
AppMainColor.brown => context.l10n.brown, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters