Skip to content

Commit

Permalink
fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Nov 8, 2024
1 parent 3db634f commit 5bdecac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
10 changes: 5 additions & 5 deletions apps/amiapp_flutter/lib/src/screens/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
_cdnHostValueController = TextEditingController(text: cioConfig?.cdnHost);
_flushAtValueController =
TextEditingController(text: cioConfig?.flushAt?.toString());
_flushIntervalValueController = TextEditingController(
text: cioConfig?.flushInterval?.toTrimmedString());
_flushIntervalValueController =
TextEditingController(text: cioConfig?.flushInterval?.toString());
_featureTrackScreens = cioConfig?.screenTrackingEnabled ?? true;
_featureTrackDeviceAttributes =
cioConfig?.autoTrackDeviceAttributes ?? true;
Expand Down Expand Up @@ -115,11 +115,11 @@ class _SettingsScreenState extends State<SettingsScreen> {
_cdnHostValueController.text = defaultConfig.cdnHost ?? '';
_flushAtValueController.text = defaultConfig.flushAt?.toString() ?? '';
_flushIntervalValueController.text =
defaultConfig.flushInterval?.toTrimmedString() ?? '';
_featureTrackScreens = defaultConfig.screenTrackingEnabled ?? true;
defaultConfig.flushInterval?.toString() ?? '';
_featureTrackScreens = defaultConfig.screenTrackingEnabled;
_featureTrackDeviceAttributes =
defaultConfig.autoTrackDeviceAttributes ?? true;
_featureDebugMode = defaultConfig.debugModeEnabled ?? true;
_featureDebugMode = defaultConfig.debugModeEnabled;
_saveSettings(context);
});
}
Expand Down
9 changes: 0 additions & 9 deletions apps/amiapp_flutter/lib/src/utils/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,6 @@ extension AmiAppStringExtensions on String {
}
}

extension AmiAppIntExtensions on int {
String? toTrimmedString() {
if (this % 1.0 != 0.0) {
return toString();
}
return toStringAsFixed(0);
}
}

extension LocationExtensions on GoRouter {
// Get location of current route
// This is a workaround to get the current location as location property
Expand Down

0 comments on commit 5bdecac

Please sign in to comment.