Kaynağa Gözat

1.钱包明细增加骨架图

tags/0.0.2^2
杨华轩 4 yıl önce
ebeveyn
işleme
4df30af826
2 değiştirilmiş dosya ile 214 ekleme ve 1 silme
  1. +3
    -1
      lib/pages/bil_detail_page/bil_detail_page.dart
  2. +211
    -0
      lib/widgets/wallet_bil_detail/wallet_bil_sk.dart

+ 3
- 1
lib/pages/bil_detail_page/bil_detail_page.dart Dosyayı Görüntüle

@@ -10,6 +10,8 @@ import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_bg_notifi
import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_notifier.dart';
import 'package:zhiying_base_widget/utils/contants.dart';
import 'package:zhiying_base_widget/widgets/others/mine_header_bg_widget.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/wallet_detail_sk.dart';
import 'package:zhiying_base_widget/widgets/wallet_bil_detail/wallet_bil_sk.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/util/custom_sliver_persistent_header_delegate.dart';
@@ -73,7 +75,7 @@ class _BilDetailPageContainerState extends State<BilDetailPageContainer> {
stream: _bloc.outData,
builder: (context, sny) {
if (sny.data == null) {
return Container();
return WalletBilDetailSkeleton();
}
var model = sny.data;
return Scaffold(


+ 211
- 0
lib/widgets/wallet_bil_detail/wallet_bil_sk.dart Dosyayı Görüntüle

@@ -0,0 +1,211 @@
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

class WalletBilDetailSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: Shimmer.fromColors(
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
child: Column(
children: <Widget>[
Container(
color: Colors.white,
height: 80,
),
SizedBox(
height: 32,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Container(
color: Colors.white,
height: 40,
width: 100,
),
Container(
color: Colors.white,
height: 40,
width: 100,
)
],
),
SizedBox(
height: 16,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 40,
width: 80,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 40,
width: 80,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 40,
width: 80,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 40,
width: 80,
)
],
),
Expanded(
child: ListView.builder(
itemCount: 3,
itemBuilder: _buildItem,
))
],
)),
);
}

Widget _buildItem(BuildContext context, int index) {
return Container(
margin: EdgeInsets.all(16),
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Container(
color: Colors.white,
height: 20,
width: 40,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 20,
width: 100,
)
],
),
SizedBox(
height: 8,
),
Row(
children: <Widget>[
Container(
color: Colors.white,
height: 20,
width: 40,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 20,
width: 120,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 20,
width: 40,
)
],
),
SizedBox(
height: 8,
),
Row(
children: <Widget>[
Container(
color: Colors.white,
height: 20,
width: 40,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 20,
width: 100,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 20,
width: 40,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 20,
width: 100,
),
],
),
SizedBox(
height: 8,
),
Row(
children: <Widget>[
Container(
color: Colors.white,
height: 20,
width: 40,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 20,
width: 100,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 20,
width: 40,
),
SizedBox(
width: 16,
),
Container(
color: Colors.white,
height: 20,
width: 100,
),
],
)
],
),
);
}
}

Yükleniyor…
İptal
Kaydet