Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F70086328
stats_grid.dart
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jul 5, 05:15
Size
1 KB
Mime Type
text/x-c++
Expires
Sun, Jul 7, 05:15 (2 d)
Engine
blob
Format
Raw Data
Handle
18788618
Attached To
R10646 Orchestration
stats_grid.dart
View Options
import 'package:flutter/material.dart';
class StatsGrid extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
height: MediaQuery.of(context).size.height * 0.25,
child: Column(
children: <Widget>[
Flexible(
child: Row(
children: <Widget>[
_buildStatCard('Trials', '', Colors.orange),
_buildStatCard('ctivitty', '', Colors.red),
],
),
),
Flexible(
child: Row(
children: <Widget>[
_buildStatCard('MIstakes in intercept', '', Colors.green),
_buildStatCard('MIstakes in slope', '', Colors.lightBlue),
_buildStatCard('Progress', '', Colors.purple),
],
),
),
],
),
);
}
Expanded _buildStatCard(String title, String count, MaterialColor color) {
return Expanded(
child: Container(
margin: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(10.0),
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(10.0),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: const TextStyle(
color: Colors.white,
fontSize: 15.0,
fontWeight: FontWeight.w600,
),
),
Text(
count,
style: const TextStyle(
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
],
),
),
);
}
}
Event Timeline
Log In to Comment