printer form, bluetooth
This commit is contained in:
@@ -9,6 +9,7 @@ import '../application/order/order_form/order_form_bloc.dart';
|
||||
import '../application/order/order_loader/order_loader_bloc.dart';
|
||||
import '../application/outlet/outlet_loader/outlet_loader_bloc.dart';
|
||||
import '../application/payment_method/payment_method_loader/payment_method_loader_bloc.dart';
|
||||
import '../application/printer/bluetooth/bluetooth_loader/bluetooth_loader_bloc.dart';
|
||||
import '../application/product/product_loader/product_loader_bloc.dart';
|
||||
import '../application/table/table_form/table_form_bloc.dart';
|
||||
import '../application/table/table_loader/table_loader_bloc.dart';
|
||||
@@ -45,6 +46,7 @@ class _AppWidgetState extends State<AppWidget> {
|
||||
BlocProvider(create: (context) => getIt<OrderLoaderBloc>()),
|
||||
BlocProvider(create: (context) => getIt<CustomerLoaderBloc>()),
|
||||
BlocProvider(create: (context) => getIt<VoidFormBloc>()),
|
||||
BlocProvider(create: (context) => getIt<BluetoothLoaderBloc>()),
|
||||
],
|
||||
child: MaterialApp.router(
|
||||
debugShowCheckedModeBanner: false,
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../application/checkout/checkout_form/checkout_form_bloc.dart';
|
||||
import '../../../application/outlet/outlet_loader/outlet_loader_bloc.dart';
|
||||
import '../../../application/printer/bluetooth/bluetooth_loader/bluetooth_loader_bloc.dart';
|
||||
import '../../../common/extension/extension.dart';
|
||||
import '../../../common/theme/theme.dart';
|
||||
import '../../../common/types/order_type.dart';
|
||||
@@ -19,3 +20,4 @@ part 'outlet_dialog.dart';
|
||||
part 'variant_dialog.dart';
|
||||
part 'delivery_dialog.dart';
|
||||
part 'order_type_dialog.dart';
|
||||
part 'printer_bluetooth_dialog.dart';
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
part of 'dialog.dart';
|
||||
|
||||
class PrinterBluetoothDialog extends StatefulWidget {
|
||||
final Function(String) onSelected;
|
||||
|
||||
const PrinterBluetoothDialog({super.key, required this.onSelected});
|
||||
|
||||
@override
|
||||
State<PrinterBluetoothDialog> createState() => _PrinterBluetoothDialogState();
|
||||
}
|
||||
|
||||
class _PrinterBluetoothDialogState extends State<PrinterBluetoothDialog> {
|
||||
@override
|
||||
void initState() {
|
||||
context.read<BluetoothLoaderBloc>().add(BluetoothLoaderEvent.fetched());
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomModalDialog(
|
||||
title: 'Bluetooth',
|
||||
contentPadding: EdgeInsets.all(16),
|
||||
minHeight: context.deviceHeight * 0.6,
|
||||
minWidth: context.deviceWidth * 0.4,
|
||||
child: BlocBuilder<BluetoothLoaderBloc, BluetoothLoaderState>(
|
||||
builder: (context, state) {
|
||||
if (state.isFetching) {
|
||||
return Center(child: LoaderWithText());
|
||||
}
|
||||
|
||||
if (state.bluetoothDevices.isEmpty) {
|
||||
return const Center(child: Text('No bluetooth printer found'));
|
||||
}
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: state.bluetoothDevices
|
||||
.map(
|
||||
(item) => Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(color: AppColor.border, width: 1),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.name,
|
||||
style: AppStyle.lg.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
SpaceHeight(4),
|
||||
Text(
|
||||
item.macAdress,
|
||||
style: AppStyle.sm.copyWith(
|
||||
color: AppColor.textSecondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
part of 'field.dart';
|
||||
|
||||
class AppDropdownSearch<T> extends StatelessWidget {
|
||||
final String label;
|
||||
final String hintText;
|
||||
final String searchHint;
|
||||
final IconData prefixIcon;
|
||||
final List<T> items;
|
||||
final T? selectedItem;
|
||||
final String Function(T) itemAsString;
|
||||
final bool Function(T?, T?)? compareFn;
|
||||
final void Function(T?)? onChanged;
|
||||
final String? Function(T?)? validator;
|
||||
final String emptyMessage;
|
||||
final String Function(String)? emptySearchMessage;
|
||||
final Widget Function(BuildContext, T, bool)? itemBuilder;
|
||||
final bool showSearchBox;
|
||||
final bool isRequired;
|
||||
|
||||
const AppDropdownSearch({
|
||||
Key? key,
|
||||
required this.label,
|
||||
required this.hintText,
|
||||
required this.items,
|
||||
required this.itemAsString,
|
||||
this.searchHint = "Cari...",
|
||||
this.prefixIcon = Icons.category_outlined,
|
||||
this.selectedItem,
|
||||
this.compareFn,
|
||||
this.onChanged,
|
||||
this.validator,
|
||||
this.emptyMessage = "Tidak ada data tersedia",
|
||||
this.emptySearchMessage,
|
||||
this.itemBuilder,
|
||||
this.showSearchBox = true,
|
||||
this.isRequired = false,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Label
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
if (isRequired)
|
||||
Text(
|
||||
' *',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.red,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
// Dropdown
|
||||
DropdownSearch<T>(
|
||||
items: items,
|
||||
selectedItem: selectedItem,
|
||||
|
||||
// Dropdown properties
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
hintText: hintText,
|
||||
hintStyle: TextStyle(color: AppColor.textSecondary, fontSize: 14),
|
||||
prefixIcon: Icon(
|
||||
prefixIcon,
|
||||
color: AppColor.textSecondary,
|
||||
size: 20,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(color: AppColor.border, width: 1.5),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(color: AppColor.border, width: 1.5),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(color: AppColor.primary, width: 2),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(color: AppColor.error, width: 1.5),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(color: AppColor.error, width: 2),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: Colors.white,
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Popup properties
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: showSearchBox,
|
||||
searchFieldProps: TextFieldProps(
|
||||
decoration: InputDecoration(
|
||||
hintText: searchHint,
|
||||
prefixIcon: const Icon(Icons.search),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
menuProps: MenuProps(
|
||||
backgroundColor: Colors.white,
|
||||
elevation: 8,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
itemBuilder: itemBuilder ?? _defaultItemBuilder,
|
||||
emptyBuilder: (context, searchEntry) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.search_off,
|
||||
color: Colors.grey.shade400,
|
||||
size: 48,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
searchEntry.isEmpty
|
||||
? emptyMessage
|
||||
: emptySearchMessage?.call(searchEntry) ??
|
||||
"Tidak ditemukan data dengan '$searchEntry'",
|
||||
style: TextStyle(
|
||||
color: Colors.grey.shade600,
|
||||
fontSize: 14,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
// Item as string (for search functionality)
|
||||
itemAsString: itemAsString,
|
||||
|
||||
// Comparison function
|
||||
compareFn: compareFn,
|
||||
|
||||
// On changed callback
|
||||
onChanged: onChanged,
|
||||
|
||||
// Validator
|
||||
validator: validator,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _defaultItemBuilder(BuildContext context, T item, bool isSelected) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? Colors.blue.shade50 : Colors.transparent,
|
||||
border: Border(
|
||||
bottom: BorderSide(color: Colors.grey.shade100, width: 0.5),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? Colors.blue.shade600 : Colors.grey.shade400,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
itemAsString(item),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: isSelected ? FontWeight.w600 : FontWeight.w500,
|
||||
color: isSelected ? Colors.blue.shade700 : Colors.black87,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isSelected)
|
||||
Icon(Icons.check, color: Colors.blue.shade600, size: 18),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:dropdown_search/dropdown_search.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
@@ -11,3 +12,4 @@ part 'password_text_field.dart';
|
||||
part 'text_field.dart';
|
||||
part 'search_text_field.dart';
|
||||
part 'customer_autocomplete.dart';
|
||||
part 'dropdown_search.dart';
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../common/theme/theme.dart';
|
||||
|
||||
class CustomTabBar extends StatelessWidget {
|
||||
final List<String> tabTitles;
|
||||
final List<Widget> tabViews;
|
||||
|
||||
const CustomTabBar({
|
||||
super.key,
|
||||
required this.tabTitles,
|
||||
required this.tabViews,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTabController(
|
||||
length: tabTitles.length,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Material(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
borderOnForeground: false,
|
||||
child: TabBar(
|
||||
isScrollable: true,
|
||||
tabAlignment: TabAlignment.start,
|
||||
labelColor: AppColor.primary,
|
||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
dividerColor: AppColor.border,
|
||||
unselectedLabelColor: AppColor.primary,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
indicatorWeight: 4,
|
||||
indicatorColor: AppColor.primary,
|
||||
tabs: tabTitles
|
||||
.map(
|
||||
(title) => Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Tab(text: title),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
// ✅ ini bagian penting
|
||||
child: TabBarView(children: tabViews),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../../../../common/data/printer_data.dart';
|
||||
import '../../../../../../../common/theme/theme.dart';
|
||||
import '../../../../../../components/button/button.dart';
|
||||
import '../../../../../../components/dialog/dialog.dart';
|
||||
import '../../../../../../components/field/field.dart';
|
||||
import '../../../../../../components/spaces/space.dart';
|
||||
|
||||
class SettingPrinterForm extends StatelessWidget {
|
||||
final String code;
|
||||
const SettingPrinterForm({super.key, required this.code});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
AppDropdownSearch<String>(
|
||||
label: 'Tipe',
|
||||
hintText: 'Printer Tipe',
|
||||
items: printerTypes,
|
||||
itemAsString: (value) => value,
|
||||
),
|
||||
SpaceHeight(12),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: AppElevatedButton.outlined(
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) =>
|
||||
PrinterBluetoothDialog(onSelected: (value) {}),
|
||||
);
|
||||
},
|
||||
label: 'Cari',
|
||||
),
|
||||
),
|
||||
SpaceHeight(12),
|
||||
AppTextFormField(label: 'Nama Printer'),
|
||||
SpaceHeight(12),
|
||||
AppDropdownSearch<String>(
|
||||
label: 'Kertas',
|
||||
hintText: 'Kertas Tipe',
|
||||
items: paperTypes,
|
||||
itemAsString: (value) => "$value mm",
|
||||
),
|
||||
SpaceHeight(20),
|
||||
AppElevatedButton.filled(onPressed: () {}, label: 'Simpan'),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../../../../common/theme/theme.dart';
|
||||
import 'setting_printer_form.dart';
|
||||
|
||||
class SettingPrinterReceipt extends StatelessWidget {
|
||||
const SettingPrinterReceipt({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
color: AppColor.background,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(children: [SettingPrinterForm(code: 'receipt')]),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../../components/page/page_title.dart';
|
||||
import '../../../../../components/tab/custom_tabbar.dart';
|
||||
import 'printer/setting_printer_receipt.dart';
|
||||
|
||||
class SettingPrinterSection extends StatelessWidget {
|
||||
const SettingPrinterSection({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
PageTitle(
|
||||
isBack: false,
|
||||
title: 'Printer',
|
||||
subtitle: 'Kelola printer untuk cetak struk',
|
||||
),
|
||||
Expanded(
|
||||
child: CustomTabBar(
|
||||
tabTitles: [
|
||||
'Receipt Printer',
|
||||
'Checker Printer',
|
||||
'Kitchen Printer',
|
||||
'Bar Printer',
|
||||
'Tiket Printer',
|
||||
],
|
||||
tabViews: [
|
||||
SettingPrinterReceipt(),
|
||||
Text('Checker Printer'),
|
||||
Text('Kitchen Printer'),
|
||||
Text('Bar Printer'),
|
||||
Text('Tiket Printer'),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,42 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../../application/printer/printer_bloc.dart';
|
||||
import '../../../../../common/theme/theme.dart';
|
||||
import '../../../../../injection.dart';
|
||||
import 'sections/setting_printer_section.dart';
|
||||
import 'widgets/setting_left_panel.dart';
|
||||
|
||||
@RoutePage()
|
||||
class SettingPage extends StatelessWidget {
|
||||
class SettingPage extends StatelessWidget implements AutoRouteWrapper {
|
||||
const SettingPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(child: Text('Setting Page'));
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.white,
|
||||
body: BlocBuilder<PrinterBloc, PrinterState>(
|
||||
builder: (context, state) {
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(flex: 2, child: SettingLeftPanel(state: state)),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: switch (state.index) {
|
||||
0 => SettingPrinterSection(),
|
||||
1 => Container(),
|
||||
_ => Container(),
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget wrappedRoute(BuildContext context) =>
|
||||
BlocProvider(create: (context) => getIt<PrinterBloc>(), child: this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../../../application/printer/printer_bloc.dart';
|
||||
import '../../../../../../common/theme/theme.dart';
|
||||
import '../../../../../components/page/page_title.dart';
|
||||
import 'setting_tile.dart';
|
||||
|
||||
class SettingLeftPanel extends StatelessWidget {
|
||||
final PrinterState state;
|
||||
const SettingLeftPanel({super.key, required this.state});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
color: AppColor.white,
|
||||
child: Column(
|
||||
children: [
|
||||
PageTitle(
|
||||
title: 'Pengaturan',
|
||||
subtitle: 'Kelola pengaturan aplikasi',
|
||||
isBack: false,
|
||||
),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
SettingTile(
|
||||
index: 0,
|
||||
currentIndex: state.index,
|
||||
title: 'Printer',
|
||||
subtitle: 'Kelola printer',
|
||||
icon: Icons.print_outlined,
|
||||
onTap: () => context.read<PrinterBloc>().add(
|
||||
PrinterEvent.indexChanged(0),
|
||||
),
|
||||
),
|
||||
SettingTile(
|
||||
index: 1,
|
||||
currentIndex: state.index,
|
||||
title: 'Sinkronisasi',
|
||||
subtitle: 'Sinkronisasi data',
|
||||
icon: Icons.sync_outlined,
|
||||
onTap: () => context.read<PrinterBloc>().add(
|
||||
PrinterEvent.indexChanged(1),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../../../common/theme/theme.dart';
|
||||
import '../../../../../components/spaces/space.dart';
|
||||
|
||||
class SettingTile extends StatelessWidget {
|
||||
final int index;
|
||||
final int currentIndex;
|
||||
final String title;
|
||||
final String subtitle;
|
||||
final IconData icon;
|
||||
final Function() onTap;
|
||||
|
||||
const SettingTile({
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.subtitle,
|
||||
required this.icon,
|
||||
required this.onTap,
|
||||
required this.index,
|
||||
required this.currentIndex,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
right: BorderSide(
|
||||
color: currentIndex == index
|
||||
? AppColor.primary
|
||||
: Colors.transparent,
|
||||
width: 4.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: 24.0,
|
||||
color: currentIndex == index
|
||||
? AppColor.primary
|
||||
: AppColor.textSecondary,
|
||||
),
|
||||
const SpaceWidth(12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
SpaceHeight(4.0),
|
||||
Text(
|
||||
subtitle,
|
||||
style: AppStyle.md.copyWith(color: AppColor.textSecondary),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -434,7 +434,7 @@ class SettingRoute extends _i22.PageRouteInfo<void> {
|
||||
static _i22.PageInfo page = _i22.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i13.SettingPage();
|
||||
return _i22.WrappedRoute(child: const _i13.SettingPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user