feat: slicing home page
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
import 'package:enaklo_pos/core/components/buttons.dart';
|
||||
import 'package:enaklo_pos/core/constants/colors.dart';
|
||||
import 'package:enaklo_pos/core/extensions/build_context_ext.dart';
|
||||
import 'package:enaklo_pos/data/models/response/table_model.dart';
|
||||
import 'package:enaklo_pos/presentation/home/pages/dashboard_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class HomeRightTitle extends StatelessWidget {
|
||||
final TableModel? table;
|
||||
const HomeRightTitle({super.key, this.table});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: context.deviceHeight * 0.1,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primary,
|
||||
border: Border(
|
||||
left: BorderSide(
|
||||
color: Colors.white,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Button.filled(
|
||||
width: 180.0,
|
||||
height: context.deviceHeight,
|
||||
elevation: 0,
|
||||
onPressed: () {},
|
||||
label: 'List Order',
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: context.deviceHeight,
|
||||
color: Colors.white,
|
||||
),
|
||||
Expanded(
|
||||
child: Button.filled(
|
||||
width: 180.0,
|
||||
height: context.deviceHeight,
|
||||
elevation: 0,
|
||||
onPressed: () {
|
||||
if (table == null) {
|
||||
context.push(DashboardPage(
|
||||
index: 1,
|
||||
));
|
||||
}
|
||||
},
|
||||
label: table == null ? 'Pilih Meja' : '${table!.id}',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user