update on settings
This commit is contained in:
parent
5bffc744e3
commit
05c3208cad
9 changed files with 205 additions and 117 deletions
47
lib/widgets/setting_widget.dart
Normal file
47
lib/widgets/setting_widget.dart
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||
|
||||
class SettingWidget extends StatelessWidget {
|
||||
final String title;
|
||||
final String value;
|
||||
final IconData icon;
|
||||
final VoidCallback? onPressed;
|
||||
const SettingWidget({super.key, required this.title, required this.value, required this.icon, this.onPressed});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromRGBO(39, 20, 36, 0.66),
|
||||
border: Border.all(color: const Color.fromRGBO(74, 74, 74, 0.127)),
|
||||
borderRadius: BorderRadius.circular(8.0)),
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
FaIcon(icon, color: const Color.fromRGBO(255, 255, 255, 1), size: 20),
|
||||
const Gap(16),
|
||||
TextWidget(text: title, size: 12, color: const Color.fromRGBO(255, 255, 255, 1)),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: onPressed,
|
||||
child: Row(
|
||||
children: [
|
||||
TextWidget(text: value, size: 12, color: const Color.fromRGBO(255, 255, 255, 1)),
|
||||
const Gap(16),
|
||||
FaIcon(Icons.arrow_forward_ios, color: const Color.fromRGBO(255, 255, 255, 1), size: 12),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue