Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:flutter_ticket_widget/flutter_ticket_widget.dart';
- import 'package:icofont_flutter/icofont_flutter.dart';
- import 'package:memiles/Helper/AppSetting.dart';
- import 'package:pigment/pigment.dart';
- class PromoView extends StatefulWidget {
- @override
- _PromoViewState createState() => _PromoViewState();
- }
- class _PromoViewState extends State<PromoView>
- with SingleTickerProviderStateMixin {
- TabController controller;
- void initState() {
- controller = new TabController(vsync: this, length: 2);
- //tambahkan SingleTickerProviderStateMikin pada class _HomeState
- super.initState();
- }
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: ColorMemiles.background,
- appBar: AppBar(
- title: Text('Promo Detail'),
- backgroundColor: ColorMemiles.primary,
- ),
- body: Container(
- height: MediaQuery.of(context).size.height,
- padding: EdgeInsets.all(20),
- child: SingleChildScrollView(
- child: Column(children: <Widget>[
- FlutterTicketWidget(
- width: MediaQuery.of(context).size.width,
- height: 120.0,
- isCornerRounded: false,
- color: Colors.white,
- child: Container(
- child: Padding(
- padding: const EdgeInsets.all(0.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Image.asset(
- 'assets/img/imagespromo.png',
- height: 120,
- width: 1200,
- fit: BoxFit.fill,
- ),
- ])),
- )),
- Container(
- padding: EdgeInsets.all(15),
- width: MediaQuery.of(context).size.width,
- color: Colors.white,
- child: Column(
- children: <Widget>[
- Text(
- 'MeMiles Challenge Assistant Head Marketing #1 awjdijawjid jaisidwaokdow ka',
- style: TextStyle(fontWeight: FontWeight.bold)),
- SizedBox(
- height: 10,
- ),
- Container(
- padding: EdgeInsets.all(10),
- // margin: EdgeInsets.all(20),
- height: 70,
- decoration: BoxDecoration(
- color: ColorMemiles.background,
- borderRadius: BorderRadius.circular(8)),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: <Widget>[
- Row(
- children: <Widget>[
- Icon(
- IcoFontIcons.money,
- color: ColorMemiles.primary,
- ),
- SizedBox(
- width: 10,
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- Text('Minimal Top UP',
- style: TextStyle(color: ColorMemiles.gray)),
- Text(
- '50 JT',
- style: TextStyle(
- color: ColorMemiles.netral,
- fontWeight: FontWeight.bold),
- )
- ],
- ),
- ],
- ),
- VerticalDivider(),
- Row(
- children: <Widget>[
- Icon(
- IcoFontIcons.uiUserGroup,
- color: ColorMemiles.primary,
- ),
- SizedBox(
- width: 10,
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- Text('Kuota Tersisa',
- style: TextStyle(color: ColorMemiles.gray)),
- Text(
- '100',
- style: TextStyle(
- color: ColorMemiles.netral,
- fontWeight: FontWeight.bold),
- )
- ],
- ),
- ],
- ),
- ],
- ),
- )
- ],
- ),
- ),
- SizedBox(height: 40),
- Container(
- padding: EdgeInsets.all(20),
- decoration: BoxDecoration(
- color: Colors.white, borderRadius: BorderRadius.circular(20)),
- child: Column(
- children: <Widget>[
- TabBar(
- labelColor: ColorMemiles.primary,
- unselectedLabelColor: ColorMemiles.gray,
- // indicatorSize: TabBarIndicatorSize.label,
- indicator: UnderlineTabIndicator(
- borderSide:
- BorderSide(color: ColorMemiles.primary, width: 2.0),
- insets: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
- ),
- controller: controller,
- tabs: <Widget>[
- Text(
- 'Ketentuan',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- Text(
- 'Cara Pakai',
- style: TextStyle(fontWeight: FontWeight.bold),
- )
- ],
- ),
- Container(
- padding: EdgeInsets.all(20),
- height: 200,
- child: TabBarView(
- controller: controller,
- children: <Widget>[
- Text(
- '1. Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n2. Amet, tincidunt fermentum morbi eget tortor mi velit, mi gravida.\n3. Egestas pellentesque enim elementum eget pulvinar dignissim.\n4. A et aliquam est consectetur duis egestas nulla et, quis.\n5. Ornare feugiat orci maecenas sit.',
- style: TextStyle(height: 1.5),
- ),
- Text('asd')
- ],
- ),
- ),
- ],
- ),
- ),
- ]))),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement