Skip to content

Commit

Permalink
Checkbox (#9)
Browse files Browse the repository at this point in the history
* checkbox

* remove comment

* widgetbook

* widgetbook
  • Loading branch information
genovevageorgieva authored and thelukewalton committed Feb 2, 2024
1 parent dec383d commit 6d9ad76
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 203 deletions.
18 changes: 6 additions & 12 deletions example/lib/pages/theme/color_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ class _ColorExampleState extends State<ColorExample> {
};

final Map<String, Color> primaries = {
'primaryColor': colors.primary,
'secondaryColor': colors.secondary,
'primaryColor': colors.primary.text,
'secondaryColor': colors.secondary.text,
};

final Map<String, Color> alerts = {
'positive': colors.positive,
'negative': colors.negative,
'warning': colors.warning,
'info': colors.info,
'positive': colors.positive.text,
'negative': colors.negative.text,
'warning': colors.warning.text,
'info': colors.info.text,
};

return ExampleScaffold(
Expand Down Expand Up @@ -291,12 +291,6 @@ class MyRow extends StatelessWidget {
}
}

extension StringExtension on Color {
String get toHexString {
return toString().substring(10, 16).toUpperCase();
}
}

Color calculateTextColor(Color background) {
return ThemeData.estimateBrightnessForColor(background) == Brightness.light ? Colors.black : Colors.white;
}
69 changes: 0 additions & 69 deletions example/lib/pages/theme_color_switch.dart

This file was deleted.

56 changes: 0 additions & 56 deletions example/lib/pages/theme_constrast_switch.dart

This file was deleted.

60 changes: 0 additions & 60 deletions example/lib/pages/theme_mode_switch.dart

This file was deleted.

16 changes: 16 additions & 0 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// Generated file. Do not edit.
//

import FlutterMacOS
import Foundation

import path_provider_foundation
import shared_preferences_foundation
import sqflite

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
}
5 changes: 1 addition & 4 deletions example/widgetbook/widgetbook.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ class HotReload extends StatelessWidget {
WidgetbookCategory(
name: 'Theme',
isInitiallyExpanded: false,
children: [
textWidgetBook(),
colorWidgetBook(),
],
children: [textWidgetBook(), colorWidgetBook(), checkboxWidgetBook()],
),
],
addons: [
Expand Down
Binary file removed lib/src/assets/fonts/zeta-icons-other.ttf
Binary file not shown.
5 changes: 4 additions & 1 deletion lib/src/components/bottom sheets/bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ class ZetaBottomSheet extends StatelessWidget {
style: ZetaTextStyles.titleMedium,
),
),
Material(child: body ?? const SizedBox()),
Material(
color: colors.surfaceSecondary,
child: body ?? const SizedBox(),
),
],
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/buttons/fab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class _ZetaFABState extends State<ZetaFAB> {
padding: EdgeInsets.zero,
shape: widget.shape.buttonShape(isExpanded: _isExpanded, size: widget.size),
backgroundColor: backgroundColor,
foregroundColor: colors.shade60.onColor,
foregroundColor: backgroundColor.onColor,
).copyWith(
overlayColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.hovered)) return colors.hover;
Expand Down

0 comments on commit 6d9ad76

Please sign in to comment.