Skip to content

Commit

Permalink
add quiz page
Browse files Browse the repository at this point in the history
  • Loading branch information
Nov1kov committed Sep 29, 2019
1 parent 19a0362 commit b652ffe
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 2 deletions.
178 changes: 178 additions & 0 deletions lib/quizpage.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
import 'package:flutter/material.dart';
import 'package:istart/resultpage.dart';
import 'Repository.dart';
import 'auth.dart';
import 'util.dart';

class QuizPage extends StatefulWidget {
QuizPage({Key key}) : super(key: key);

_QuizPageState createState() => _QuizPageState();
}

class _QuizPageState extends State<QuizPage> {
@override
void initState() {
super.initState();
}

@override
void dispose() {
super.dispose();
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
CustomColors.GradientTop,
CustomColors.GradientMiddle,
CustomColors.GradientBottom
])),
child: SingleChildScrollView(
child: Column(
children: <Widget>[
SizedBox(height: 75),
Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
"Расскажи о себе больше",
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: CustomColors.TextHeader),
),
],
),
),
SizedBox(height: 66),
Container(
height: MediaQuery.of(context).size.height / 4,
child: Column(children: <Widget>[
Container(
width: MediaQuery.of(context).size.width - 53 - 53,
child: Text(
'Нввыки',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w400,
color: CustomColors.TextHeader,
fontFamily: 'opensans'),
textAlign: TextAlign.start,
),
),
Container(
margin: EdgeInsets.fromLTRB(48, 13, 44, 13),
alignment: Alignment(0.0, 0.0),
padding: EdgeInsets.fromLTRB(28, 30, 28, 10),
height: 58,
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
new BorderRadius.all(new Radius.circular(15.0)),
boxShadow: [ui.getShadow()]),
child: TextField(
style: TextStyle(
fontSize: 14,
),
decoration: InputDecoration(
hintStyle: TextStyle(
fontSize: 14, color: CustomColors.HintText),
border: InputBorder.none,
hintText: 'Начните вводить здесь'),
),
),
SizedBox(height: 36),
]),
),
Container(
height: MediaQuery.of(context).size.height / 3,
child: Column(children: <Widget>[
Container(
width: MediaQuery.of(context).size.width - 53 - 53,
child: Text(
'Хобби',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w400,
color: CustomColors.TextHeader,
fontFamily: 'opensans'),
textAlign: TextAlign.start,
),
),
Container(
margin: EdgeInsets.fromLTRB(48, 13, 44, 13),
alignment: Alignment(0.0, 0.0),
padding: EdgeInsets.fromLTRB(28, 30, 28, 10),
height: 58,
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
new BorderRadius.all(new Radius.circular(15.0)),
boxShadow: [ui.getShadow()]),
child: TextField(
style: TextStyle(
fontSize: 14,
),
decoration: InputDecoration(
hintStyle: TextStyle(
fontSize: 14, color: CustomColors.HintText),
border: InputBorder.none,
hintText: 'Начните вводить здесь'),
),
),
SizedBox(height: 36),
]),
),
_buildMoreProfessionals(),
],
),
),
),
),
);
}

Widget _buildMoreProfessionals() {
return Container(
width: MediaQuery.of(context).size.width / 1.2,
margin: EdgeInsets.fromLTRB(0, 18, 0, 50),
height: 58,
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: <Color>[
CustomColors.AccentColor,
CustomColors.AccentColor,
],
),
borderRadius: BorderRadius.all(
Radius.circular(15.0),
),
boxShadow: [
BoxShadow(
color: CustomColors.AccentShadow,
blurRadius: 25.0,
spreadRadius: 5.0,
offset: Offset(0.0, 0.0),
),
],
),
child: Center(
child: const Text(
'РАССКАЗАТЬ О СЕБЕ БОЛЬШЕ',
style: TextStyle(
color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),
),
),
);
}
}
4 changes: 3 additions & 1 deletion lib/resultpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class _ResultPageState extends State<ResultPage> {
color: Colors.white,
borderRadius:
new BorderRadius.all(new Radius.circular(15.0)),
boxShadow: [ui.getShadow()],
),
child: Column(
children: <Widget>[
Expand Down Expand Up @@ -140,7 +141,8 @@ class _ResultPageState extends State<ResultPage> {
url: selectedItJob != null
? selectedItJob.links[0]
: "",
androidToolbarColor: CustomColors.AccentColor)
androidToolbarColor:
CustomColors.AccentColor)
},
child: Container(
margin: EdgeInsets.all(22),
Expand Down
3 changes: 2 additions & 1 deletion lib/splash.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:istart/quizpage.dart';
import 'package:istart/resultpage.dart';
import 'package:istart/util.dart';

Expand Down Expand Up @@ -39,7 +40,7 @@ class _splashscreenState extends State<splashscreen> {

void openHelloPage() {
Navigator.of(context).pushReplacement(MaterialPageRoute(
builder: (context) => HelloPage(),
builder: (context) => QuizPage(),
));
}

Expand Down
13 changes: 13 additions & 0 deletions lib/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,25 @@ class CustomColors {
static const Color TextWhite = Color.fromRGBO(243, 243, 243, 1);
static const Color HeaderCircle = Color.fromRGBO(255, 255, 255, 0.17);

static const Color HintText = Color.fromRGBO(203, 203, 203, 1);
static const Color AccentColor = Color.fromRGBO(84, 104, 255, 1);
static const Color AccentShadow = Color.fromRGBO(84, 184, 255, 0.68);
static const Color GrayShadow = Color.fromRGBO(190, 190, 190, 0.2);

static const Color GradientBottom = Color.fromRGBO(194, 212, 248, 1);
static const Color StatusBarColor = Color.fromRGBO(194, 212, 248, 0.3);
static const Color GradientTop = Color.fromRGBO(247, 249, 253, 1);
static const Color GradientMiddle = Color.fromRGBO(244, 248, 255, 1);
static const Color BorderColor = Color.fromRGBO(84, 105, 255, 1);
}

class ui {
static BoxShadow getShadow() {
return BoxShadow(
color: CustomColors.GrayShadow,
blurRadius: 19.0,
spreadRadius: 12.0,
offset: Offset(0.0, 0.0),
);
}
}

0 comments on commit b652ffe

Please sign in to comment.