toolheim/mobile-app/lib/screens/unit_screen.dart
2019-08-07 14:55:33 +02:00

39 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:toolheim/data/github_adapter.dart';
import 'package:toolheim/data/warband_roster.dart' as roster;
import 'package:toolheim/widgets/stats_widget.dart';
class UnitScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
GitHubAdapter github = Provider.of<GitHubAdapter>(context);
final roster.Hero hero = ModalRoute.of(context).settings.arguments;
return Scaffold(
appBar: AppBar(
actions: <Widget>[
CircleAvatar(
child: Text(hero.experience.toString()),
backgroundColor: Colors.green,
foregroundColor: Colors.greenAccent,
),
],
title: Column(
children: <Widget>[
Text(hero.name),
Text(
hero.type,
textAlign: TextAlign.left,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.normal),
)
],
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
)),
body: Column(
children: <Widget>[StatsWidget(hero.stats)],
));
}
}