Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,18 @@ localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"


def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}

plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
2 changes: 2 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:elearning/ui/pages/help.dart';
import 'package:elearning/ui/pages/home.dart';
import 'package:elearning/ui/pages/navmenu/menu_dashboard_layout.dart';
import 'package:elearning/ui/pages/onboarding1.dart';
import 'package:elearning/ui/pages/setting.dart';
import 'package:elearning/ui/pages/undefinedScreen.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
Expand Down
10 changes: 10 additions & 0 deletions lib/routes/router.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import 'package:elearning/routes/routing_constants.dart';
import 'package:elearning/ui/pages/home.dart';
import 'package:elearning/ui/pages/setting.dart';
import 'package:elearning/ui/pages/undefinedScreen.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:elearning/analytics/analytics_service.dart';

import '../auth/google_auth.dart';
import 'routing_constants.dart';
import 'routing_constants.dart';

List<String> navStack = ["Home"];
Route<dynamic> generateRoute(RouteSettings settings) {
switch (settings.name) {
Expand All @@ -13,6 +18,11 @@ Route<dynamic> generateRoute(RouteSettings settings) {
print(navStack);
analytics.setCurrentScreen(screenName: HomeRoute);
return CupertinoPageRoute(builder: (context) => Home());
// case GoogleSignInRoute:
// return CupertinoPageRoute(builder: (context) => GoogleAuth());
case SettingsRoute:
return CupertinoPageRoute(builder: (context) => Settings());

// case SearchRoute:
// navStack.add("Search");
// print(navStack);
Expand Down
2 changes: 2 additions & 0 deletions lib/routes/routing_constants.dart
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
const String HomeRoute = '/';
const String SearchRoute = '/search';
const String GoogleSignInRoute = '/googleSigIn';
const String SettingsRoute = '/settings';
118 changes: 118 additions & 0 deletions lib/ui/pages/help.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import 'dart:math';
import 'dart:ui';

import 'package:elearning/ui/widgets/sectionHeader.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:expand_widget/expand_widget.dart';

bool selected = false;

class Help extends StatefulWidget {
@override
_HelpState createState() => _HelpState();
}

class _HelpState extends State<Help> {
Widget _container(String title, String txt) {
return Container(
// h,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(15)),

// color: Colors.white,
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: Column(children: <Widget>[
SectionHeader(
text: title,
onPressed: () {
setState(() {
selected = !selected;
});
// selected = !selected;
}),
Padding(
padding: const EdgeInsets.fromLTRB(30, 0, 30, 0),
child: GestureDetector(
onTap: () {
setState(() {
selected = !selected;
});
},
child: AnimatedContainer(
height: selected ? 0 : double.maxFinite,
duration: Duration(microseconds: 10),
child: Text(
txt,
// maxLength: 2,

style: TextStyle(
fontSize: 12.0,
color: Colors.black54,
fontFamily: 'Red Hat Display',
),

// ),
),
),
),
),
]),
),
);
}

@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
trailing: CupertinoButton(
child: Icon(
Icons.search,
color: Colors.black,
),
onPressed: null),
backgroundColor: Colors.white,
leading: CupertinoButton(
child: Icon(
Icons.chevron_left,
color: Colors.black,
),
onPressed: () {
Navigator.pop(context);
},
),
middle: Text(
'Help',
style: TextStyle(
color: Colors.black, fontFamily: 'Red Hat Display', fontSize: 24),
),
),
child: SingleChildScrollView(
// col: Color(0xffE5E5E5),

child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
_container('How you eanr coins ?',
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."),
// Text("asdfghjklkjhgfdsasdfghj"),
// _container('How you eanr coins ?',
// "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."),
// _container('How you eanr coins ?',
// "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."),
// _container('How you eanr coins ?',
// "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."),
// _container('How you eanr coins ?',
// "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."),
// _container('How you eanr coins ?',
// "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."),
// _container('How you eanr coins ?',
// "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."),
],
),
),
);
}
}
1 change: 1 addition & 0 deletions lib/ui/pages/onboarding1.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class _OnboardingState extends State<Onboarding> {
width: MediaQuery.of(context).size.width * 0.6,
child: Text(
"Ask questions, earn coins and dominate the global leaderboard.",
// overflow: TextOverflow,
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: 'Red Hat Display',
Expand Down
96 changes: 96 additions & 0 deletions lib/ui/pages/setting.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:expand_widget/expand_widget.dart';

import '../widgets/card.dart';

Widget _container(IconData icon, String title) {
return Container(
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(15)),
height: 45,
// color: Colors.white,
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: Row(children: <Widget>[
Icon(
icon,
color: Colors.black,
),
SizedBox(width: 20),
Text(title,
style: TextStyle(
color: Color(0xffADADAD),
fontSize: 25,
)),
]),
),
);
}

class Settings extends StatefulWidget {
@override
_SettingsState createState() => _SettingsState();
}

class _SettingsState extends State<Settings> {
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
trailing: CupertinoButton(
child: Icon(
Icons.search,
color: Colors.black,
),
onPressed: null),
backgroundColor: Colors.white,
leading: CupertinoButton(
child: Icon(
Icons.chevron_left,
color: Colors.black,
),
onPressed: () {
Navigator.pop(context);
},
),
middle: Text(
'Settings',
style: TextStyle(
color: Colors.black, fontFamily: 'Red Hat Display', fontSize: 24),
),
),
child: Container(
color: Color(0xffE5E5E5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
CupertinoButton(
child: _container(Icons.supervised_user_circle, 'Logout'),
onPressed: null),
CupertinoButton(
child: _container(Icons.supervised_user_circle, 'Clear Data'),
onPressed: null),
CupertinoButton(
child: _container(Icons.supervised_user_circle, 'ads '),
onPressed: null),
CupertinoButton(
child: _container(
Icons.supervised_user_circle, 'How you earn coins ?'),
onPressed: null),

CupertinoButton(
child: _container(Icons.supervised_user_circle, 'Logout'),
onPressed: null),
// CupertinoButton(
// child: _container(Icons.supervised_user_circle, 'Logout'),
// onPressed: null),
// CupertinoButton(child: Text('hello'), onPressed: null),
// CupertinoButton(child: Text('hello'), onPressed: null),
// CardWidget(gradient: false, button: true, child: Text('LOG OUT')),
],
),
),
);
}
}
12 changes: 9 additions & 3 deletions lib/ui/widgets/sectionHeader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ import 'package:elearning/theme/box_icons_icons.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart' as material;

class SectionHeader extends StatelessWidget {
class SectionHeader extends StatefulWidget {
const SectionHeader({
Key key,
@required this.text,
@required this.onPressed,
}) : super(key: key);
final String text;
final Function onPressed;

@override
_SectionHeaderState createState() => _SectionHeaderState();
}

class _SectionHeaderState extends State<SectionHeader> {
@override
Widget build(BuildContext context) {
return Row(
Expand All @@ -24,7 +30,7 @@ class SectionHeader extends StatelessWidget {
color: Color(0xFF343434)),
),
Text(
text,
widget.text,
style: TextStyle().copyWith(
fontSize: 17.0,
),
Expand All @@ -33,7 +39,7 @@ class SectionHeader extends StatelessWidget {
CupertinoButton(
child:
Icon(BoxIcons.bx_chevron_right, color: material.Colors.lightBlue),
onPressed: onPressed,
onPressed: widget.onPressed,
)
],
);
Expand Down
7 changes: 7 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
expand_widget:
dependency: "direct main"
description:
name: expand_widget
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+2"
file:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies:
cloud_firestore: ^0.13.7
firebase_auth: ^0.16.1
flutter_calendar_carousel: ^1.4.12
expand_widget: ^0.2.0+2


# The following adds the Cupertino Icons font to your application.
Expand Down