mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-11-08 12:39:17 +00:00
Added covid-19 example app and Updated the readme (#73)
This commit is contained in:
31
covid19_mobile_app/lib/widgets/info_card.dart
Normal file
31
covid19_mobile_app/lib/widgets/info_card.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// this is the rounded rectangle card widget that appears on the homescreen
|
||||
Widget infoCard(BuildContext context, String title, String number) {
|
||||
return Card(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
title,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: MediaQuery.of(context).size.height * 0.03,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Text(
|
||||
number,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(40.0)),
|
||||
color: Color(0xfff44e3f),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user