Files
FlutterUnit/lib/components/project/unit_drawer_header.dart
2021-09-27 09:38:18 +08:00

88 lines
2.4 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({required this.color});
@override
Widget build(BuildContext context) {
return DrawerHeader(
padding: EdgeInsets.only(top: 10, left: 15),
decoration: 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: <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)
]),
),
],
),
SizedBox(
height: 15,
),
Text(
'The Unity Of Flutter, The Unity Of Coder.',
style: TextStyle(fontSize: 15, color: Colors.white, shadows: [
Shadow(color: color, offset: Offset(.5, .5), blurRadius: 1)
]),
),
SizedBox(
height: 5,
),
Text(
'Flutter的联合编程者的联合。',
style: TextStyle(fontSize: 15, color: Colors.white, shadows: [
Shadow(color: color, offset: Offset(.5, .5), blurRadius: 1)
]),
),
SizedBox(
height: 10,
),
Row(
children: <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,
),
],
),
],
),
);
}
}