40 lines
1.0 KiB
Dart
40 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ExerciseDetailsView extends StatelessWidget{
|
|
String name, description, amount, type, unit;
|
|
|
|
ExerciseDetailsView(this.name, this.description, this.amount, this.type, this.unit);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// TODO: implement build
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
leading: IconButton(
|
|
onPressed: (){
|
|
Navigator.pop(context);
|
|
},
|
|
icon: Icon(Icons.arrow_back),
|
|
),
|
|
title: Text(name),
|
|
),
|
|
body: ListView(
|
|
padding: EdgeInsets.all(8),
|
|
children: <Widget>[
|
|
Center(
|
|
child: Text(name + ' ' + amount + ' ' + unit, style: TextStyle(
|
|
fontSize: 25,
|
|
fontWeight: FontWeight.bold
|
|
),),
|
|
),
|
|
SizedBox(
|
|
height: 8,
|
|
),
|
|
Text(description, style: TextStyle(
|
|
fontSize: 15,
|
|
), textAlign: TextAlign.justify,)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
} |