You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/widgets/drawer/drawer_item_widget.dart

56 lines
1.5 KiB
Dart

import 'dart:ui';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
///
class DrawerItem extends StatefulWidget {
final String title;
final String subTitle;
final IconData icon;
final Color textColor;
final Color iconColor;
DrawerItem(this.title, this.icon,
{this.textColor = Colors.black,
this.iconColor = Colors.black87,
this.subTitle = ''});
@override
_DrawerItemState createState() => _DrawerItemState();
}
class _DrawerItemState extends State<DrawerItem> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(top: 5, bottom: 5, left: 10, right: 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Icon(
widget.icon,
color: widget.iconColor,
size: SizeConfig.imageSizeMultiplier * 5,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
widget.title,
color: widget.textColor,
fontSize: SizeConfig.textMultiplier * 2.3,
),
Texts(
widget.subTitle,
color: widget.textColor,
fontSize: SizeConfig.textMultiplier * 2.5,
),
],
),
],
),
);
}
}