1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-17 02:38:39 +01:00
git-touch-android-ios-app/lib/ios/user.dart

41 lines
1.0 KiB
Dart
Raw Normal View History

2018-04-21 19:07:22 +02:00
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import '../utils.dart';
class IosUserPage extends StatelessWidget {
String login;
String avatar;
IosUserPage(this.login, this.avatar);
@override
build(context) {
2018-07-05 16:08:19 +02:00
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
leading: CupertinoButton(
child: Text('Cancel'),
padding: EdgeInsets.zero,
onPressed: () {
Navigator.of(context).pop(false);
2018-04-21 19:07:22 +02:00
},
2018-07-05 16:08:19 +02:00
),
middle: Text(login),
),
child: FutureBuilder(
future: fetchUser(login),
builder: (context, snapshot) {
Widget widget;
if (snapshot.hasData) {
User user = snapshot.data;
return Text('');
} else if (snapshot.hasError) {
widget = Text("${snapshot.error}");
} else {
widget = CupertinoActivityIndicator();
}
return widget;
},
),
);
2018-04-21 19:07:22 +02:00
}
}