1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-16 10:20:55 +01:00
git-touch-android-ios-app/lib/ios/user.dart
Rongjian Zhang dd456132f4 Add
2018-07-05 22:08:19 +08:00

41 lines
1.0 KiB
Dart

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) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
leading: CupertinoButton(
child: Text('Cancel'),
padding: EdgeInsets.zero,
onPressed: () {
Navigator.of(context).pop(false);
},
),
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;
},
),
);
}
}