Files
FlutterUnit/lib/components/project/unit_drawer_header.dart
2022-03-26 21:25:40 +08:00

88 lines
2.5 KiB
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:flutter/material.dart';
/// create by 张风捷特烈 on 2020-04-22
/// contact me by email 1981462002@qq.com
/// 说明:
class UnitDrawerHeader extends StatelessWidget {
final Color color;
const UnitDrawerHeader({Key? key, required this.color}) : super(key: key);
@override
Widget build(BuildContext context) {
return DrawerHeader(
padding: const EdgeInsets.only(top: 10, left: 15),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/wy_300x200_filter.webp'),
fit: BoxFit.cover),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Wrap(
spacing: 10,
crossAxisAlignment: WrapCrossAlignment.center,
children: const <Widget>[
FlutterLogo(
size: 35,
),
Text(
'Flutter Unit',
style: TextStyle(fontSize: 24, color: Colors.white, shadows: [
Shadow(
color: Colors.black,
offset: Offset(1, 1),
blurRadius: 3)
]),
),
],
),
const SizedBox(
height: 15,
),
Text(
'The Unity Of Flutter, The Unity Of Coder.',
style: TextStyle(fontSize: 15, color: Colors.white, shadows: [
Shadow(color: color, offset: const Offset(.5, .5), blurRadius: 1)
]),
),
const SizedBox(
height: 5,
),
Text(
'Flutter的联合编程者的联合。',
style: TextStyle(fontSize: 15, color: Colors.white, shadows: [
Shadow(color: color, offset: const Offset(.5, .5), blurRadius: 1)
]),
),
const SizedBox(
height: 10,
),
Row(
children: const <Widget>[
Spacer(
flex: 5,
),
Text(
'—— 张风捷特烈',
style: TextStyle(fontSize: 15, color: Colors.white, shadows: [
Shadow(
color: Colors.orangeAccent,
offset: Offset(.5, .5),
blurRadius: 1)
]),
),
Spacer(
flex: 1,
),
],
),
],
),
);
}
}