git
This commit is contained in:
19
lib/pages/layout/home/components/header/header_logic.dart
Normal file
19
lib/pages/layout/home/components/header/header_logic.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'header_state.dart';
|
||||
|
||||
class HeaderLogic extends GetxController {
|
||||
final HeaderState state = HeaderState();
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class HeaderState {
|
||||
HeaderState() {
|
||||
///Initialize variables
|
||||
}
|
||||
}
|
||||
59
lib/pages/layout/home/components/header/header_view.dart
Normal file
59
lib/pages/layout/home/components/header/header_view.dart
Normal file
@@ -0,0 +1,59 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../../utils/utils.dart';
|
||||
import 'header_logic.dart';
|
||||
|
||||
class HeaderComponent extends StatelessWidget {
|
||||
const HeaderComponent({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final logic = Get.put(HeaderLogic());
|
||||
final state = Get.find<HeaderLogic>().state;
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
child: Image.network(
|
||||
"https://pic.ziyuan.wang/user/guest/2023/12/微信图片_20231109211458_c1a41ab0fd7dd.jpg",
|
||||
width: 50.0,
|
||||
)),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
const Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"商家: GAGA酒吧",
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(
|
||||
"Huakk,欢迎回来!!!",
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
ToolFn.tips("点击了核销按钮");
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.qr_code_scanner,
|
||||
size: 32,
|
||||
))
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
5
lib/pages/layout/home/components/header/index.dart
Normal file
5
lib/pages/layout/home/components/header/index.dart
Normal file
@@ -0,0 +1,5 @@
|
||||
library header_component;
|
||||
|
||||
export './header_logic.dart';
|
||||
export './header_state.dart';
|
||||
export './header_view.dart';
|
||||
Reference in New Issue
Block a user