Commit c667c3a9 authored by Administrator's avatar Administrator

extracted LapsListWidget

parent f28dda91
import 'package:encrateia/widgets/activity_metadata_widget.dart';
import 'package:encrateia/widgets/laps_list_widget.dart';
import 'package:flutter/material.dart';
import 'package:encrateia/models/activity.dart';
......@@ -12,14 +13,26 @@ class ShowActivityScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
'${activity.db.name}',
overflow: TextOverflow.ellipsis,
return DefaultTabController(
length: 2,
child: Scaffold(
appBar: AppBar(
bottom: TabBar(
tabs: [
Tab(icon: Icon(Icons.directions_run)),
Tab(icon: Icon(Icons.timer)),
],
),
title: Text(
'${activity.db.name}',
overflow: TextOverflow.ellipsis,
),
),
body: TabBarView(children: [
ActivityMetadataWidget(activity: activity),
LapsListWidget(activity: activity),
]),
),
body: ActivityMetadataWidget(activity: activity),
);
}
}
import 'package:flutter/material.dart';
import 'package:encrateia/models/activity.dart';
class LapsListWidget extends StatelessWidget {
final Activity activity;
LapsListWidget({this.activity});
@override
Widget build(context) {
return new Text("Second Tab");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment