Skip to content

Fix GSSlider remove material class dependency #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions example/lib/widgets/components/widgets/slider_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ GSSlider(
isDisabled: $isDisabled,
isReversed: $isReversed,
orientation: $selectedOrientationOption,
defaultValue: 3,
minValue: 0,
maxValue: 10,
onChanged: (value) {
setState(() {
currentValue = value;
Expand All @@ -87,9 +90,11 @@ GSSlider(
isDisabled: isDisabled,
isReversed: isReversed,
orientation: selectedOrientationOption,
defaultValue: 3,
minValue: 0,
maxValue: 10,
onChanged: (value) {
setState(() {
});
setState(() {});
},
),
controls: Column(
Expand Down
24 changes: 11 additions & 13 deletions example/lib/widgets/storybook/widgets/slider_story.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ final class SliderStory extends StoryWidget {
return Story(
name: storyName,
builder: (context) => GSSlider(
size: GSSliderSizes.values[context.knobs
.options(label: 'Size', initial: 0, options: sizeOptions)],
orientation: GSOrientations.values[context.knobs.options(
label: 'Orientation',
initial: 0,
options: orientationOptions)],
isDisabled:
context.knobs.boolean(label: "isDisabled", initial: false),

isReversed:
context.knobs.boolean(label: "isReversed", initial: false),
// style: GSStyle(width: 30),
));
size: GSSliderSizes.values[context.knobs
.options(label: 'Size', initial: 0, options: sizeOptions)],
orientation: GSOrientations.values[context.knobs.options(
label: 'Orientation', initial: 0, options: orientationOptions)],
isDisabled:
context.knobs.boolean(label: "isDisabled", initial: false),
isReversed:
context.knobs.boolean(label: "isReversed", initial: false),
minValue: 0,
maxValue: 10,
defaultValue: 3));
}

@override
Expand Down
8 changes: 4 additions & 4 deletions lib/src/widgets/gs_app/gs_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ class _GSAppState extends State<GSApp> {
localeListResolutionCallback: widget.localeListResolutionCallback,
supportedLocales: widget.supportedLocales,
showPerformanceOverlay: widget.showPerformanceOverlay,
checkerboardRasterCacheImages: widget.checkerboardRasterCacheImages,
checkerboardOffscreenLayers: widget.checkerboardOffscreenLayers,
// checkerboardRasterCacheImages: widget.checkerboardRasterCacheImages,
// checkerboardOffscreenLayers: widget.checkerboardOffscreenLayers,
showSemanticsDebugger: widget.showSemanticsDebugger,
debugShowCheckedModeBanner: widget.debugShowCheckedModeBanner,
shortcuts: widget.shortcuts,
Expand All @@ -310,8 +310,8 @@ class _GSAppState extends State<GSApp> {
localeResolutionCallback: widget.localeResolutionCallback,
supportedLocales: widget.supportedLocales,
showPerformanceOverlay: widget.showPerformanceOverlay,
checkerboardRasterCacheImages: widget.checkerboardRasterCacheImages,
checkerboardOffscreenLayers: widget.checkerboardOffscreenLayers,
// checkerboardRasterCacheImages: widget.checkerboardRasterCacheImages,
// checkerboardOffscreenLayers: widget.checkerboardOffscreenLayers,
showSemanticsDebugger: widget.showSemanticsDebugger,
debugShowCheckedModeBanner: widget.debugShowCheckedModeBanner,
shortcuts: widget.shortcuts,
Expand Down
6 changes: 3 additions & 3 deletions lib/src/widgets/gs_form_control/gs_form_control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Form Control Compatible Components:
class GSFormControl extends StatefulWidget {
final GlobalKey<FormState> formKey;
final Widget child;
final PopInvokedCallback? onPopInvoked;
// final PopInvokedCallback? onPopInvoked;
final VoidCallback? onChanged;
final AutovalidateMode autovalidateMode;
final bool? canPop;
Expand All @@ -32,7 +32,7 @@ class GSFormControl extends StatefulWidget {
const GSFormControl({
super.key,
required this.child,
this.onPopInvoked,
// this.onPopInvoked,
this.onChanged,
this.autovalidateMode = AutovalidateMode.disabled,
this.canPop,
Expand Down Expand Up @@ -84,7 +84,7 @@ class _GSFormControlState extends State<GSFormControl> {
key: widget.formKey,
canPop: widget.canPop,
onChanged: widget.onChanged,
onPopInvoked: widget.onPopInvoked,
// onPopInvoked: widget.onPopInvoked,
autovalidateMode: widget.autovalidateMode,
child: widget.child,
),
Expand Down
2 changes: 0 additions & 2 deletions lib/src/widgets/gs_radio/gs_radio_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'package:gluestack_ui/src/style/gs_config_style_internal.dart';
import 'package:gluestack_ui/src/style/style_resolver.dart';
import 'package:gluestack_ui/src/widgets/gs_radio/gs_radio_icon_style.dart';

import 'package:gluestack_ui/src/widgets/gs_radio/gs_radio_raw.dart';

class GSRadioIcon<T> extends StatelessWidget {
final Color? activeColor;
final bool autofocus;
Expand Down
1 change: 0 additions & 1 deletion lib/src/widgets/gs_radio/gs_radio_raw.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/cupertino.dart';
import 'package:gluestack_ui/gluestack_ui.dart';
import 'gs_toggleable.dart';

const Size _size = Size(18.0, 18.0);
const double _kOuterRadius = 8.0;
Expand Down
1 change: 1 addition & 0 deletions lib/src/widgets/gs_radio/public.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export 'gs_radio_icon.dart';
export 'gs_radio_provider.dart';
export 'gs_radio_text.dart';
export 'gs_radio.dart';
export 'gs_radio_raw.dart';
Loading