You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

153 lines
5.0 KiB

import 'package:flutter/material.dart';
import 'package:teso/Classes/API%20Clasess/Campaign.dart';
import 'package:teso/Pages/Sub_Pages/Campaign/Video/RecordVideo.dart';
import 'package:teso/providers/pageAnimations.dart';
import 'package:teso/util/consts.dart';
class Audition extends StatefulWidget {
final Campaign campaign;
const Audition({Key key, this.campaign}) : super(key: key);
@override
_AuditionState createState() => _AuditionState();
}
class _AuditionState extends State<Audition> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
widget.campaign.title,
),
centerTitle: true,
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: ListView(
scrollDirection: Axis.vertical,
children: [
Container(
width: MediaQuery.of(context).size.width,
height: 150,
child: Center(
child: Container(
width: 150,
height: 150,
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey,
width: 0.5,
),
borderRadius: BorderRadius.only(
topRight: Radius.circular(30),
topLeft: Radius.circular(30),
bottomLeft: Radius.circular(30),
bottomRight: Radius.circular(30),
),
),
child: ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0),
bottomLeft: Radius.circular(30),
bottomRight: Radius.circular(30),
),
child: Image(
width: MediaQuery.of(context).size.width * 0.28,
height: 110,
fit: BoxFit.fill,
image: NetworkImage(widget.campaign.targetProduct != null
? productURL + widget.campaign.targetProduct
: ""),
),
),
),
),
),
SizedBox(
height: 20,
),
Container(
width: MediaQuery.of(context).size.width,
child: Center(
child: new RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 14.0,
color: Theme.of(context).primaryColorLight,
),
children: <TextSpan>[
new TextSpan(
text: "Publisher : ",
style: new TextStyle(
fontWeight: FontWeight.bold,
),
),
new TextSpan(
text: widget.campaign.businessID,
),
],
),
),
),
),
SizedBox(
height: 10,
),
Container(
width: MediaQuery.of(context).size.width,
child: Center(
child: Text(
"Description",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16.5,
),
),
),
),
Container(
width: MediaQuery.of(context).size.width,
child: Center(
child: Text(widget.campaign.description),
),
),
SizedBox(
height: 30,
),
Container(
width: double.infinity,
child: Align(
alignment: Alignment.center,
child: Container(
width: 100,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(20.0),
),
),
primary: accentMain,
),
onPressed: () => Navigator.pushReplacement(
context,
PageTransition(
child: RecordVideo(
campaignID: widget.campaign.campaignID,
),
type: PageTransitionType.fade,
),
),
child: Text("Submit Ad"),
),
),
),
),
],
),
),
);
}
}