carga
This commit is contained in:
@@ -29,6 +29,21 @@ class _ReputationProScreenState extends State<ReputationProScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
Widget _scoreList(List<ScoreDetailModel> list) {
|
||||
if (list.isEmpty) {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 40),
|
||||
child: Center(
|
||||
child: Text('Sin calificaciones'),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Column(
|
||||
children: list.map((e) => _scoreItem(e)).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -38,18 +53,11 @@ class _ReputationProScreenState extends State<ReputationProScreen> {
|
||||
},
|
||||
label: 'Reputación'),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
..._scoresList(scoresModel?.details ?? []),
|
||||
],
|
||||
)),
|
||||
child: _scoreList(scoresModel?.details ?? []),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
List<Widget> _scoresList(List<ScoreDetailModel> list) {
|
||||
return list.map((e) => _scoreItem(e)).toList();
|
||||
}
|
||||
|
||||
Widget _scoreItem(ScoreDetailModel scoreDetails) {
|
||||
return ListTile(
|
||||
onTap: () {},
|
||||
|
||||
@@ -29,6 +29,21 @@ class _ReputationScreenState extends State<ReputationScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
Widget _scoreList(List<ScoreDetailModel> list) {
|
||||
if (list.isEmpty) {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 40),
|
||||
child: Center(
|
||||
child: Text('Sin calificaciones'),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Column(
|
||||
children: list.map((e) => _scoreItem(e)).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -38,18 +53,11 @@ class _ReputationScreenState extends State<ReputationScreen> {
|
||||
},
|
||||
label: 'Reputación'),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
..._scoresList(scoresModel?.details ?? []),
|
||||
],
|
||||
)),
|
||||
child: _scoreList(scoresModel?.details ?? []),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
List<Widget> _scoresList(List<ScoreDetailModel> list) {
|
||||
return list.map((e) => _scoreItem(e)).toList();
|
||||
}
|
||||
|
||||
Widget _scoreItem(ScoreDetailModel scoreDetails) {
|
||||
return ListTile(
|
||||
onTap: () {},
|
||||
|
||||
@@ -19,9 +19,7 @@ class _WebViewScreenState extends State<WebViewScreen> {
|
||||
..setBackgroundColor(const Color(0x00000000))
|
||||
..setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
onProgress: (int progress) {
|
||||
// Update loading bar.
|
||||
},
|
||||
onProgress: (int progress) {},
|
||||
onPageStarted: (String url) {},
|
||||
onPageFinished: (String url) {},
|
||||
onWebResourceError: (WebResourceError error) {},
|
||||
@@ -35,13 +33,22 @@ class _WebViewScreenState extends State<WebViewScreen> {
|
||||
)
|
||||
..loadRequest(Uri.parse(widget.link));
|
||||
return Scaffold(
|
||||
appBar: PopAppbar(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
label: widget.label,
|
||||
),
|
||||
body: WebViewWidget(controller: controller),
|
||||
);
|
||||
appBar: PopAppbar(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
label: widget.label,
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
const Center(child: CircularProgressIndicator()),
|
||||
WebViewWidget(controller: controller),
|
||||
],
|
||||
)
|
||||
|
||||
// isLoading
|
||||
// ? const Center(child: CircularProgressIndicator())
|
||||
// : WebViewWidget(controller: controller),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user