38 lines
986 B
Dart
38 lines
986 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:remixicon/remixicon.dart';
|
|
|
|
class TopBar extends StatelessWidget implements PreferredSizeWidget {
|
|
final bool showOther;
|
|
final void Function()? onOther;
|
|
|
|
const TopBar({super.key, this.showOther = false, this.onOther});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AppBar(
|
|
foregroundColor: Colors.white,
|
|
titleTextStyle: TextStyle(color: Colors.white, fontSize: 18),
|
|
backgroundColor: Color(0xff232426),
|
|
centerTitle: true,
|
|
title: Column(
|
|
children: [
|
|
Text("会议"),
|
|
Text(
|
|
"01:12",
|
|
style: TextStyle(fontSize: 12, color: Colors.white24),
|
|
),
|
|
],
|
|
),
|
|
actions: [
|
|
IconButton(
|
|
onPressed: onOther,
|
|
icon: Icon(showOther ? RemixIcons.team_fill : RemixIcons.team_line),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
@override
|
|
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
|
|
}
|