123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- import 'package:flutter/cupertino.dart';
- import 'package:flutter/material.dart';
- import 'package:sport/bean/rank_game_info.dart';
- import 'package:sport/widgets/appbar.dart';
- import 'package:sport/widgets/space.dart';
- class RankIntroduce extends StatefulWidget {
- RankGameInfoData data;
- RankIntroduce(this.data);
- @override
- State<StatefulWidget> createState() {
- // TODO: implement createState
- return _RankIntroduceState();
- }
- }
- class _RankIntroduceState extends State<RankIntroduce> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Colors.white,
- body: CustomScrollView(slivers: <Widget>[
- buildSliverAppBar(context, "榜单说明",),
- SliverToBoxAdapter(
- child: Padding(
- padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 20),
- child: Column(
- children: <Widget>[
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 4.0),
- child: Row(
- children: <Widget>[
- Text("榜单名称:",style: Theme.of(context).textTheme.subtitle1),
- Expanded(
- child: Text("${widget.data.rank.name}",style: Theme.of(context).textTheme.bodyText2.copyWith(color: Color(0xff666666))
- ),
- )
- ],
- ),
- ),
- Divider(),
- Padding(
- padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 4.0),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Text("榜单说明:",style: Theme.of(context).textTheme.subtitle1),
- Expanded(child: Text("${widget.data.rank.introduceDetail}",style: Theme.of(context).textTheme.bodyText2))
- ],
- ),
- ),
- Divider(),
- Padding(
- padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 4.0),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Text("标语:",style: Theme.of(context).textTheme.subtitle1),
- Expanded(
- child: Text("${widget.data.rank.slogan}",style: Theme.of(context).textTheme.bodyText2),
- )
- ],
- ),
- ),
- Divider(),
- Padding(
- padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 4.0),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Text("评定规则:",style: Theme.of(context).textTheme.subtitle1),
- Expanded(
- child: Text("${widget.data.rank.rule}",style: Theme.of(context).textTheme.bodyText2),
- )
- ],
- ),
- ),
- Divider(),
- Padding(
- padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 4.0),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Text("奖励明细:",style: Theme.of(context).textTheme.subtitle1),
- Expanded(
- child: Column(
- children: widget.data.rank.reward.map((e) => Column(children: <Widget>[Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: <Widget>[
- Text("第${e.begin}-${e.end}名",style: Theme.of(context).textTheme.bodyText2),
- Text("+${e.score} 积分",style: Theme.of(context).textTheme.subtitle1
- .copyWith(color: Theme.of(context).accentColor))
- ],), Space(height: 3.0,),],)).toList(),
- ),
- )
- ],
- )
- ),
- Divider(),
- Padding(
- padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 4.0),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Text("奖励发放:",style: Theme.of(context).textTheme.subtitle1),
- Expanded(
- child: Text("${widget.data.rank.distribute}",style: Theme.of(context).textTheme.bodyText2),
- )
- ],
- ),
- ),
- ],
- ),
- )
- )
- ]));
- }
- }
|