|
|
@@ -4,13 +4,22 @@ import 'home_controller.dart';
|
|
|
|
|
|
class HomeAppBar extends GetView<HomeController>
|
|
|
implements PreferredSizeWidget {
|
|
|
- const HomeAppBar({super.key, required this.tab});
|
|
|
+ const HomeAppBar({super.key, required this.tab, this.actions});
|
|
|
|
|
|
final Widget tab;
|
|
|
+ final List<Widget>? actions;
|
|
|
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
final statusBarHeight = MediaQuery.of(context).viewPadding.top;
|
|
|
+ final wActions = <Widget>[];
|
|
|
+ if (actions!= null){
|
|
|
+ for (final one in actions!!){
|
|
|
+ wActions.add(one);
|
|
|
+ wActions.add(const SizedBox(width: 12));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
return SizedBox.expand(
|
|
|
child: Container(
|
|
|
@@ -43,16 +52,21 @@ class HomeAppBar extends GetView<HomeController>
|
|
|
style: const TextStyle(
|
|
|
color: Colors.white, fontSize: 15.64))
|
|
|
]))),
|
|
|
- TextButton(
|
|
|
- onPressed: () {},
|
|
|
- child: const Row(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
- children: [
|
|
|
- Icon(Icons.radio, color: Colors.white),
|
|
|
- Text(' 广播',
|
|
|
- style: TextStyle(color: Colors.white, fontSize: 15.64))
|
|
|
- ],
|
|
|
- ))
|
|
|
+ Row(
|
|
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
+ children: wActions,
|
|
|
+ ),
|
|
|
+ const SizedBox(width: 24)
|
|
|
+ // TextButton(
|
|
|
+ // onPressed: () {},
|
|
|
+ // child: const Row(
|
|
|
+ // crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
+ // children: [
|
|
|
+ // Icon(Icons.radio, color: Colors.white),
|
|
|
+ // Text(' 广播',
|
|
|
+ // style: TextStyle(color: Colors.white, fontSize: 15.64))
|
|
|
+ // ],
|
|
|
+ // ))
|
|
|
],
|
|
|
),
|
|
|
));
|