Skip to content

Commit

Permalink
Modified: features of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
tawhidularefindcc committed Jan 11, 2022
1 parent 81f7d7a commit 82626b5
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 23 deletions.
Binary file removed images/arrow_forward.png
Binary file not shown.
41 changes: 40 additions & 1 deletion images/arrow_forward.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions images/ic_font_size.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/ic_language.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion images/ic_theme.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/theme.png
Binary file not shown.
27 changes: 13 additions & 14 deletions lib/app/modules/settings/views/settings_view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_getx_template/app/core/values/app_values.dart';
import 'package:flutter_getx_template/app/modules/settings/widgets/settings_widgets.dart';
import 'package:flutter_getx_template/app/modules/settings/widgets/item_settings_widgets.dart';
import 'package:fluttertoast/fluttertoast.dart';
import '/app/core/base/base_view.dart';
import '/app/core/widget/custom_app_bar.dart';
Expand All @@ -24,22 +23,22 @@ class SettingsView extends BaseView<SettingsController> {
_getView() => Column(
children: [
ItemSettings(
() => _show('Theme clicked'),
'ic_theme.svg',
'arrow_forward.png',
'Theme',
title: 'Theme',
prefixImage: 'ic_theme.svg',
suffixImage: 'arrow_forward.svg',
onTap: () => _show('Theme clicked'),
),
ItemSettings(
() => _show('Language clicked'),
'ic_theme.svg',
'arrow_forward.png',
'Language',
title: 'Language',
prefixImage: 'ic_language.svg',
suffixImage: 'arrow_forward.svg',
onTap: () => _show('Language clicked'),
),
ItemSettings(
() => _show('Font Size clicked'),
'ic_theme.svg',
'arrow_forward.svg',
'Font Size',
title: 'Font Size',
prefixImage: 'ic_font_size.svg',
suffixImage: 'arrow_forward.svg',
onTap: () => _show('Font Size clicked'),
),
],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,38 @@ import 'package:flutter_getx_template/app/core/widget/asset_image_view.dart';
import 'package:flutter_getx_template/app/core/widget/ripple.dart';

class ItemSettings extends StatelessWidget with BaseWidgetMixin {
ItemSettings({
required this.prefixImage,
required this.suffixImage,
required this.title,
required this.onTap,
});
final String prefixImage;
final String suffixImage;
final String title;
final Function()? onTap;

ItemSettings(this.onTap, this.prefixImage, this.suffixImage, this.title);

@override
Widget body(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(AppValues.padding),
child: Ripple(
onTap: () => onTap,
onTap: onTap,
child: Row(
children: [
AssetImageView(
fileName: prefixImage,
height: AppValues.margin_20,
width: AppValues.margin_20,
height: AppValues.iconSize_20,
width: AppValues.iconSize_20,
),
const SizedBox(width: 10),
Text(title, style: titleStyle),
const Spacer(),
AssetImageView(
fileName: suffixImage,
color: AppColors.centerTextColor,
height: AppValues.margin_20,
width: AppValues.margin_20,
height: AppValues.iconSize_20,
width: AppValues.iconSize_20,
),
],
),
Expand Down

0 comments on commit 82626b5

Please sign in to comment.