This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:beautiful_list/model/lesson.dart'; | |
import 'package:flutter/material.dart'; | |
class DetailPage extends StatelessWidget { | |
final Lesson lesson; | |
DetailPage({Key key, this.lesson}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final topContent = Stack( | |
children: <Widget>[ | |
Container( | |
padding: EdgeInsets.only(left: 10.0), | |
height: MediaQuery.of(context).size.height * 0.5, | |
decoration: new BoxDecoration( | |
image: new DecorationImage( | |
image: new AssetImage("drive-steering-wheel.jpg"), | |
fit: BoxFit.cover, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final topContentText = Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
SizedBox(height: 120.0), | |
Icon( | |
Icons.directions_car, | |
color: Colors.white, | |
size: 40.0, | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final levelIndicator = Container( | |
child: Container( | |
child: LinearProgressIndicator( | |
backgroundColor: Color.fromRGBO(209, 224, 224, 0.2), | |
value: lesson.indicatorValue, | |
valueColor: AlwaysStoppedAnimation(Colors.green)), | |
), | |
); | |
final coursePrice = Container( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final bottomContentText = Text( | |
lesson.content, | |
style: TextStyle(fontSize: 18.0), | |
); | |
final readButton = Padding( | |
padding: EdgeInsets.symmetric(vertical: 16.0), | |
child: RaisedButton( | |
onPressed: () => {}, | |
color: Color.fromRGBO(58, 66, 86, 1.0), | |
child: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:beautiful_list/model/lesson.dart'; | |
import 'package:flutter/material.dart'; | |
class DetailPage extends StatelessWidget { | |
final Lesson lesson; | |
DetailPage({Key key, this.lesson}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
final levelIndicator = Container( | |
child: Container( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assets: | |
- drive-steering-wheel.jpg | |
fonts: | |
- family: Raleway | |
fonts: | |
- asset: fonts/Raleway-Regular.ttf | |
- asset: fonts/Raleway-Thin.ttf | |
style: normal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class AppDrawer extends StatefulWidget { | |
@override | |
_AppDrawerState createState() => _AppDrawerState(); | |
} | |
class _AppDrawerState extends State<AppDrawer> { | |
@override | |
Widget build(BuildContext context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Card topArea() => Card( | |
margin: EdgeInsets.all(10.0), | |
elevation: 1.0, | |
shape: RoundedRectangleBorder( | |
borderRadius: BorderRadius.all(Radius.circular(50.0))), | |
child: Container( | |
decoration: BoxDecoration( | |
gradient: RadialGradient( | |
colors: [Color(0xFF015FFF), Color(0xFF015FFF)])), | |
padding: EdgeInsets.all(5.0), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Container( | |
color: Colors.white, | |
child: Column( | |
children: <Widget>[ | |
topArea(), | |
], | |
), | |
), |