-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9572b6
commit 7d08c85
Showing
41 changed files
with
385 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"android":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"macos":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"linux":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"windows":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"web":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","dependencies":[]}]},"dependencyGraph":[{"name":"rive_common","dependencies":[]}],"date_created":"2024-10-03 14:43:31.190499","version":"3.24.1","swift_package_manager_enabled":false} | ||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"android":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"macos":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"linux":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"windows":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","native_build":true,"dependencies":[]}],"web":[{"name":"rive_common","path":"/Users/vanlooverenkoen/.pub-cache/hosted/pub.dev/rive_common-0.4.11/","dependencies":[]}]},"dependencyGraph":[{"name":"rive_common","dependencies":[]}],"date_created":"2024-10-04 09:03:25.291994","version":"3.24.1","swift_package_manager_enabled":false} |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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,47 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class AppDebugFlag extends StatelessWidget { | ||
final bool showDebugFlag; | ||
final String? flavorBannerText; | ||
final Color flavorBannerColor; | ||
final Widget child; | ||
|
||
const AppDebugFlag({ | ||
required this.showDebugFlag, | ||
required this.flavorBannerText, | ||
required this.child, | ||
required this.flavorBannerColor, | ||
super.key, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final showFlavorBannerFlag = flavorBannerText != null; | ||
if (!showDebugFlag && !showFlavorBannerFlag) return child; | ||
return Directionality( | ||
textDirection: TextDirection.ltr, | ||
child: Builder( | ||
builder: (context) { | ||
Widget child = this.child; | ||
if (showDebugFlag) { | ||
child = Banner( | ||
message: 'Debug', | ||
location: BannerLocation.topEnd, | ||
child: child, | ||
); | ||
} | ||
if (showFlavorBannerFlag) { | ||
child = Banner( | ||
message: flavorBannerText!, | ||
location: BannerLocation.topStart, | ||
color: flavorBannerColor, | ||
child: child, | ||
); | ||
} | ||
|
||
return child; | ||
}, | ||
), | ||
); | ||
} | ||
} |
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,30 +1,35 @@ | ||
import 'dart:ui'; | ||
|
||
import 'package:flutter/widgets.dart'; | ||
import 'package:impaktfull_ui_2/src/theme/theme.dart'; | ||
|
||
ImpaktfullUiTheme? _theme; | ||
ImpaktfullUiTheme? _testTheme; | ||
Locale? _locale; | ||
|
||
ImpaktfullUiTheme get theme { | ||
if (_testTheme != null) return _testTheme!; | ||
if (_theme == null) { | ||
throw Exception( | ||
'Impaktfull theme is not set, make sure you call setImpaktfullTheme() before using theme.'); | ||
throw Exception('Impaktfull theme is not set, make sure you call setImpaktfullTheme() before using theme.'); | ||
} | ||
return _theme!; | ||
} | ||
|
||
Locale get locale { | ||
if (_locale == null) { | ||
throw Exception( | ||
'Impaktfull locale is not set, make sure you call setImpaktfullLocale() before using theme.'); | ||
throw Exception('Impaktfull locale is not set, make sure you call setImpaktfullLocale() before using theme.'); | ||
} | ||
return _locale!; | ||
} | ||
|
||
void setImpaktfullUiTheme(ImpaktfullUiTheme? theme) { | ||
if (_testTheme != null) return; | ||
_theme = theme ?? ImpaktfullUiTheme.getDefault(); | ||
} | ||
|
||
@visibleForTesting | ||
void setImpaktfullUiTestTheme(ImpaktfullUiTheme? theme) { | ||
_testTheme = theme; | ||
} | ||
|
||
void setImpaktfullUiLocale(Locale? locale) { | ||
_locale = locale ?? const Locale('en'); | ||
} |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:impaktfull_ui_2/impaktfull_ui.dart'; | ||
|
||
import '../../../util/golden_test_util.dart'; | ||
import '../../../util/golden_test_variant.dart'; | ||
|
||
void main() { | ||
setUp(() => setupComponentTest()); | ||
|
||
runComponentTest( | ||
fileName: 'impaktfull_app', | ||
goldenTests: () => [ | ||
GoldenTest( | ||
description: 'App', | ||
child: ImpaktfullUiApp( | ||
title: 'impaktfull app', | ||
home: Container( | ||
width: 400, | ||
height: 400, | ||
color: theme.colors.accent, | ||
), | ||
), | ||
), | ||
], | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,27 @@ | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:impaktfull_ui_2/impaktfull_ui.dart'; | ||
|
||
import '../../../util/golden_test_util.dart'; | ||
import '../../../util/golden_test_variant.dart'; | ||
|
||
void main() { | ||
setUp(() => setupComponentTest()); | ||
|
||
runComponentTest( | ||
fileName: 'impaktfull_ui_button', | ||
columns: 5, | ||
goldenTests: () => [ | ||
for (final type in ImpaktfullUiButtonType.values) ...[ | ||
for (final size in ImpaktfullUiButtonSize.values) ...[ | ||
GoldenTest( | ||
child: ImpaktfullUiButton( | ||
type: type, | ||
title: 'Button', | ||
size: size, | ||
), | ||
), | ||
], | ||
], | ||
], | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.