소스 검색

导入文件

tags/0.0.1
Weller 4 년 전
부모
커밋
b8e0faebe9
3개의 변경된 파일31개의 추가작업 그리고 17개의 파일을 삭제
  1. +1
    -1
      .dart_tool/package_config.json
  2. +15
    -7
      lib/pages/hot_ranking_page/hot_ranking_page.dart
  3. +15
    -9
      lib/widgets/hot_ranking/hot_ranking_appbar/hot_ranking_appbar.dart

+ 1
- 1
.dart_tool/package_config.json 파일 보기

@@ -614,7 +614,7 @@
"languageVersion": "2.1"
}
],
"generated": "2020-10-14T02:50:46.733318Z",
"generated": "2020-10-14T06:28:04.630762Z",
"generator": "pub",
"generatorVersion": "2.8.2"
}

+ 15
- 7
lib/pages/hot_ranking_page/hot_ranking_page.dart 파일 보기

@@ -9,6 +9,7 @@ import 'package:zhiying_base_widget/utils/contants.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:provider/provider.dart';
import 'package:cached_network_image/cached_network_image.dart';

import 'hot_ranking_page_bloc.dart';

@@ -80,14 +81,13 @@ class __HotRankingPageContainerState extends State<_HotRankingPageContainer> {
return StreamBuilder(
stream: _bloc.outData,
builder: (context, asyncSnapshot) {

var model = asyncSnapshot.data;
if (model == null) {
return HotRankingPageSkeleton();
}
for (var item in model) {
WidgetModel widgetModel =
WidgetModel.fromJson(Map<String, dynamic>.from(item));
WidgetModel.fromJson(Map<String, dynamic>.from(item));
if (item.containsKey("mod_name") &&
item['mod_name'] == "hot_rank_bg_img") {
_bloc.backgroundImage = json.decode(item['data'])['bg_img'];
@@ -124,7 +124,7 @@ class __HotRankingPageContainerState extends State<_HotRankingPageContainer> {
} else {
for (var item in model) {
WidgetModel widgetModel =
WidgetModel.fromJson(Map<String, dynamic>.from(item));
WidgetModel.fromJson(Map<String, dynamic>.from(item));
if (item.containsKey("mod_name") &&
item['mod_name'] == "hot_rank_tab_view") {
list.add(Expanded(
@@ -149,14 +149,22 @@ class _SilverAppBarDelegate extends SliverPersistentHeaderDelegate {
final Widget child;

@override
double get minExtent => MediaQuery.of(context).padding.top + 44;
double get minExtent =>
MediaQuery
.of(context)
.padding
.top + 44;

@override
double get maxExtent => MediaQuery.of(context).padding.top + 44;
double get maxExtent =>
MediaQuery
.of(context)
.padding
.top + 44;

@override
Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) {
Widget build(BuildContext context, double shrinkOffset,
bool overlapsContent) {
return child;
}



+ 15
- 9
lib/widgets/hot_ranking/hot_ranking_appbar/hot_ranking_appbar.dart 파일 보기

@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/hot_ranking/hot_ranking_appbar/model/hot_ranking_appbaar_model.dart';
import 'package:zhiying_comm/util/extension/color.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:cached_network_image/cached_network_image.dart';

class HotRankingAppBar extends StatelessWidget {
final Map<String, dynamic> data;
@@ -14,31 +15,36 @@ class HotRankingAppBar extends StatelessWidget {
Widget build(BuildContext context) {
var model = HotRankingAppbarModel.fromJson(json.decode(data['data']));
return Container(
height: MediaQuery.of(context).padding.top + 56,
height: MediaQuery
.of(context)
.padding
.top + 56,
child: AppBar(
elevation: 0,
leading: Navigator.canPop(context)
? IconButton(
icon: Icon(Icons.arrow_back_ios),
onPressed: () {
Navigator.of(context).pop();
})
icon: Icon(Icons.arrow_back_ios),
onPressed: () {
Navigator.of(context).pop();
})
: Container(),
backgroundColor: HexColor.fromHex(model.appBarBgColor==""?"#00000000":model.appBarBgColor),
backgroundColor: HexColor.fromHex(
model.appBarBgColor == "" ? "#00000000" : model.appBarBgColor),
centerTitle: true,
title: Container(
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Text(
model.appBarName??"",
model.appBarName ?? "",
style:
TextStyle(color: HexColor.fromHex(model.appBarNameColor??"")),
TextStyle(
color: HexColor.fromHex(model.appBarNameColor ?? "")),
),
CachedNetworkImage(
height: 40.w,
width: 144.w,
imageUrl: model.appBarNameImg??"",
imageUrl: model.appBarNameImg ?? "",
fit: BoxFit.fill,
)
],


불러오는 중...
취소
저장