forked from hasancse91/flutter_getx_template
-
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.
Merge branch 'hasancse91:master' into master
- Loading branch information
Showing
18 changed files
with
182 additions
and
275 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
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.
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
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,25 +1,61 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import '/app/modules/settings/widgets/item_settings_widgets.dart'; | ||
import '/app/core/base/base_view.dart'; | ||
import '/app/core/values/text_styles.dart'; | ||
import '/app/core/widget/custom_app_bar.dart'; | ||
import '/app/modules/settings/controllers/settings_controller.dart'; | ||
|
||
class SettingsView extends BaseView<SettingsController> { | ||
@override | ||
PreferredSizeWidget? appBar(BuildContext context) { | ||
return CustomAppBar( | ||
appBarTitleText: 'Settings', | ||
appBarTitleText: appLocalization.bottomNavSettings, | ||
isBackButtonEnabled: false, | ||
); | ||
} | ||
|
||
@override | ||
Widget body(BuildContext context) { | ||
return const Center( | ||
child: Text( | ||
'SettingsView is working', | ||
style: titleStyle, | ||
), | ||
return Column( | ||
children: [ | ||
ItemSettings( | ||
title: appLocalization.settingsTheme, | ||
prefixImage: 'ic_theme.png', | ||
suffixImage: 'arrow_forward.svg', | ||
onTap: _onThemeItemClicked, | ||
), | ||
_getHorizontalDivider(), | ||
ItemSettings( | ||
title: appLocalization.settingsLanguage, | ||
prefixImage: 'ic_language.svg', | ||
suffixImage: 'arrow_forward.svg', | ||
onTap: _onLanguageItemClicked, | ||
), | ||
_getHorizontalDivider(), | ||
ItemSettings( | ||
title: appLocalization.settingsFontSize, | ||
prefixImage: 'ic_font_size.svg', | ||
suffixImage: 'arrow_forward.svg', | ||
onTap: _onFontSizeItemClicked, | ||
), | ||
_getHorizontalDivider(), | ||
], | ||
); | ||
} | ||
|
||
Widget _getHorizontalDivider() { | ||
return const Divider(height: 1); | ||
} | ||
|
||
void _onThemeItemClicked() { | ||
showToast('Theme: Development in progress'); | ||
} | ||
|
||
void _onLanguageItemClicked() { | ||
showToast('Language: Development in progress'); | ||
} | ||
|
||
void _onFontSizeItemClicked() { | ||
showToast('Font Size: Development in progress'); | ||
} | ||
|
||
} |
49 changes: 49 additions & 0 deletions
49
lib/app/modules/settings/widgets/item_settings_widgets.dart
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,49 @@ | ||
import 'package:flutter/material.dart'; | ||
import '/app/core/base/base_widget_mixin.dart'; | ||
import '/app/core/values/app_colors.dart'; | ||
import '/app/core/values/app_values.dart'; | ||
import '/app/core/values/text_styles.dart'; | ||
import '/app/core/widget/asset_image_view.dart'; | ||
import '/app/core/widget/ripple.dart'; | ||
|
||
class ItemSettings extends StatelessWidget with BaseWidgetMixin { | ||
final String prefixImage; | ||
final String suffixImage; | ||
final String title; | ||
final Function()? onTap; | ||
|
||
ItemSettings({ | ||
required this.prefixImage, | ||
required this.suffixImage, | ||
required this.title, | ||
required this.onTap, | ||
}); | ||
|
||
@override | ||
Widget body(BuildContext context) { | ||
return Ripple( | ||
onTap: onTap, | ||
child: Padding( | ||
padding: const EdgeInsets.all(AppValues.padding), | ||
child: Row( | ||
children: [ | ||
AssetImageView( | ||
fileName: prefixImage, | ||
height: AppValues.iconSize_20, | ||
width: AppValues.iconSize_20, | ||
), | ||
const SizedBox(width: AppValues.smallPadding), | ||
Text(title, style: settingsItemStyle), | ||
const Spacer(), | ||
AssetImageView( | ||
fileName: suffixImage, | ||
color: AppColors.suffixImageColor, | ||
height: AppValues.iconSize_20, | ||
width: AppValues.iconSize_20, | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.