Files
xueguang_flutter_app/lib/pages/student/home/widgets/user_header.dart
2025-11-19 17:56:39 +08:00

45 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:remixicon/remixicon.dart';
class UserHeader extends StatelessWidget implements PreferredSizeWidget {
const UserHeader({super.key});
@override
Widget build(BuildContext context) {
return AppBar(
title: const Text('学光自习室'),
actions: [
Container(
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 8),
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [Color(0xffffb900), Color(0xffff8904)],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
borderRadius: BorderRadius.circular(20),
),
child: Row(
spacing: 5,
children: [
const Icon(
RemixIcons.vip_crown_line,
color: Colors.white,
size: 18,
),
Text(
"会员至 2025-03-12",
style: TextStyle(color: Colors.white, fontSize: 14),
),
],
),
),
const SizedBox(width: 15),
],
);
}
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}