GAM3RG33K / flutter_settings_screens

Settings Screen with Custom Shared Preference Interface
MIT License
176 stars 71 forks source link

Switch adaptive for IOS #32

Closed azazadev closed 3 years ago

azazadev commented 3 years ago

Hi, why inside SettingsScreen the Switch is not using adaptive ?

current code

  _SettingsSwitch({
    @required this.value,
    @required this.onChanged,
    @required this.enabled,
  });

  @override
  Widget build(BuildContext context) {
    return Switch(
      value: value,
      onChanged: enabled ? onChanged : null,
    );
  }
}

expected code :

  _SettingsSwitch({
    @required this.value,
    @required this.onChanged,
    @required this.enabled,
  });

  @override
  Widget build(BuildContext context) {
    return Switch.adaptive(
      value: value,
      onChanged: enabled ? onChanged : null,
    );
  }
}
GAM3RG33K commented 3 years ago

Hi, I am aware of this, but It will be kind of incomplete to only make some widgets adaptible and not all.

I did not consider the UX differences while making this library. My focus was on making a base for all deceloper to easily build a settings screen for their app & get on with other tasks.

There are many differences in visual part of widgets on Android and iOS and I am planning to make an overhaul change regarding visual elements like this.

If you feel like it, you are more than welcome to contribute in this.

GAM3RG33K commented 3 years ago

This change has been merged & published as v0.3.0-null-safety.

Though it is a prerelease version right now, to find & fix some quick bugs if any. Soon it will be a stable one.