Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mikyll committed Jan 2, 2022
1 parent b1eade3 commit 2816adc
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 86 deletions.
81 changes: 0 additions & 81 deletions app-mobile/flutter_application/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:roquiz/model/QuestionRepository.dart';
import 'package:roquiz/views/ViewMenu.dart';
Expand All @@ -9,40 +8,6 @@ void main() {
runApp(const MyApp());
}

/*class ROquizApp extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _ROquizAppState();
}
}*/

/*lass _ROquizAppState extends State<ROquizApp> {
QuestionRepository qRepo;
List<bool> selectedTopics;
_ROquizAppState() {
final file = File("assets/domande.txt");
Stream<String> lines =
file.openRead().transform(utf8.decoder).transform(LineSplitter());
try {
await for (String l in lines) {
}
}
catch (e) {
print("Error: $e");
}
}
@override
Widget build(BuildContext context) {
// TODO: implement build
throw UnimplementedError();
}
}*/

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

Expand All @@ -55,49 +20,3 @@ class MyApp extends StatelessWidget {
);
}
}
/*
Widget titleSection = Container(
padding: const EdgeInsets.all(32),
child: Column(
children: [],
),
);
Widget titleSection = Container(
padding: const EdgeInsets.all(32),
child: Row(
children: [
Expanded(
/*1*/
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
/*2*/
Container(
padding: const EdgeInsets.only(bottom: 8),
child: const Text(
'Oeschinen Lake Campground',
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
),
Text(
'Kandersteg, Switzerland',
style: TextStyle(
color: Colors.grey[500],
),
),
],
),
),
/*3*/
Icon(
Icons.star,
color: Colors.red[500],
),
const Text('41'),
],
),
);
*/
50 changes: 47 additions & 3 deletions app-mobile/flutter_application/lib/views/ViewInfo.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,61 @@
import 'package:flutter/material.dart';
import 'package:roquiz/views/ViewMenu.dart';
import 'package:auto_size_text/auto_size_text.dart';

class ViewInfoWidget extends StatelessWidget {
const ViewInfoWidget({Key? key}) : super(key: key);
class ViewInfo extends StatelessWidget {
const ViewInfo({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.indigo[900],
extendBodyBehindAppBar: true,
appBar: AppBar(
title: const Text("Quiz"),
title: const Text("Info"),
centerTitle: true,
backgroundColor: Colors.transparent,
automaticallyImplyLeading: true,
leading: IconButton(
icon: const Icon(Icons.arrow_back_ios),
onPressed: () {
Navigator.push(
context, MaterialPageRoute(builder: (context) => ViewMenu()));
},
),
),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Center(
child: Container(
width: double.infinity,
height: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(25),
),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const AutoSizeText(
"Applicazione sviluppata da Michele Righi",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.black),
),
const AutoSizeText(
"Ciao",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Colors.black),
),
],
)))),
),
),
);
}
Expand Down
18 changes: 16 additions & 2 deletions app-mobile/flutter_application/lib/views/ViewMenu.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:roquiz/constants.dart';
import 'package:roquiz/model/QuestionRepository.dart';
import 'package:roquiz/views/ViewQuiz.dart';
Expand Down Expand Up @@ -172,13 +173,26 @@ class ViewMenuState extends State<ViewMenu> {
),
const SizedBox(height: 20),
InkWell(
onTap: () {},
onTap: () {
/*Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ViewInfo()));*/
},
// remove those to enable splash effects
splashColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
child: Container(
alignment: Alignment.center,
width: 60, // fix: fit <->
height: 60,
decoration: const BoxDecoration(
gradient: kPrimaryGradient,
gradient: LinearGradient(
colors: [Color(0x8846A0AE), Color(0x8800FFCB)],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
borderRadius:
BorderRadius.all(Radius.circular(30))),
child: const Icon(
Expand Down
56 changes: 56 additions & 0 deletions app-mobile/flutter_application/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
flutter:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -163,6 +170,48 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
package_info_plus:
dependency: "direct main"
description:
name: package_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
package_info_plus_linux:
dependency: transitive
description:
name: package_info_plus_linux
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
package_info_plus_macos:
dependency: transitive
description:
name: package_info_plus_macos
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
package_info_plus_web:
dependency: transitive
description:
name: package_info_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
package_info_plus_windows:
dependency: transitive
description:
name: package_info_plus_windows
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -329,6 +378,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.3"
xml:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions app-mobile/flutter_application/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies:
get: ^4.1.4
auto_size_text: ^3.0.0
url_launcher: ^6.0.17
package_info_plus: ^1.3.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 2816adc

Please sign in to comment.