Skip to content

Commit

Permalink
feat: Geo-Quest Screen completed
Browse files Browse the repository at this point in the history
  • Loading branch information
AritraBiswas9788 committed Jul 30, 2024
1 parent 453b1f7 commit b9b54f7
Show file tree
Hide file tree
Showing 29 changed files with 3,386 additions and 148 deletions.
Binary file added assets/icons/earth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/locsubmit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/mars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/moon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/pin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/lottie/congrats.json

Large diffs are not rendered by default.

51 changes: 28 additions & 23 deletions lib/components/navisland.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:latlong2/latlong.dart';
import 'package:super_liquid_galaxy_controller/controllers/lg_connection.dart';
import 'package:super_liquid_galaxy_controller/screens/geoquest.dart';
import 'package:super_liquid_galaxy_controller/screens/kml_builder.dart';
import 'package:super_liquid_galaxy_controller/screens/maps_controller.dart';
import 'package:super_liquid_galaxy_controller/screens/poi_exploration.dart';
import 'package:super_liquid_galaxy_controller/screens/test.dart';
import 'package:super_liquid_galaxy_controller/screens/tour_builder.dart';
import 'package:super_liquid_galaxy_controller/utils/kmlgenerator.dart';
import 'package:super_liquid_galaxy_controller/utils/balloongenerator.dart';

import '../generated/assets.dart';
import '../utils/constants.dart';

//ignore_for_file: prefer_const_constructors
//ignore_for_file: prefer_const_literals
Expand All @@ -21,6 +24,8 @@ class NavIsland extends StatelessWidget {
double width;
Widget? child;

int i =0;

@override
Widget build(BuildContext context) {
return Padding(
Expand Down Expand Up @@ -80,7 +85,9 @@ class NavIsland extends StatelessWidget {
Material(
color: Colors.transparent,
child: InkWell(
onTap: () {},
onTap: () {
Get.to(() => PoiExploration());
},
borderRadius: BorderRadius.circular(15),
child: Container(
width: double.infinity,
Expand Down Expand Up @@ -174,25 +181,25 @@ class NavIsland extends StatelessWidget {
color: Colors.transparent,
child: InkWell(
onTap: () async {
LatLng start = LatLng(7, 11);
LatLng end = LatLng(1, 5);

double dashLength =
10000.0; // Length of each dash in meters
double gapLength =
5000.0; // Length of gap between dashes in meters

String kmlOutput =
KMLGenerator.generatefootPrintLine(
end,
start,
dashLength,
gapLength);
print(kmlOutput.length);
Get.to(()=>GeoQuest());
/*i++;
try {
LGConnection connection = Get.find();
await connection.cleanBalloon();
await connection.renderInSlave(2,(i%2==0)?Constants.testKml:Constants.testKml1);
} catch (e) {
if (!Get.isSnackbarOpen) {
Get.showSnackbar(GetSnackBar(
backgroundColor:
Colors.red.shade300,
title: "Error",
message: "$e",
isDismissible: true,
duration: 5.seconds,
));
}
}*/

print(kmlOutput);
Get.to(
() => TestScreen(kml: kmlOutput));
},
borderRadius: BorderRadius.circular(15),
child: Container(
Expand Down Expand Up @@ -274,7 +281,6 @@ class NavIsland extends StatelessWidget {
Expanded(
child: Container(
height: double.infinity,

child: FittedBox(
fit: BoxFit.fitWidth,
child: Padding(
Expand Down Expand Up @@ -334,7 +340,6 @@ class NavIsland extends StatelessWidget {
Expanded(
child: Container(
height: double.infinity,

child: FittedBox(
fit: BoxFit.fitWidth,
child: Padding(
Expand Down
116 changes: 62 additions & 54 deletions lib/components/planet_selector.dart
Original file line number Diff line number Diff line change
@@ -1,80 +1,88 @@
import 'dart:ui';

import 'package:flutter/material.dart';

//ignore_for_file: prefer_const_constructors
//ignore_for_file: prefer_const_literals

class PlanetSelector extends StatefulWidget {
PlanetSelector({super.key,required this.height,required this.width});
PlanetSelector({super.key,required this.height,required this.width, required this.onPressed});

double width;
double height;
VoidCallback onPressed;
@override
State<PlanetSelector> createState() => _PlanetSelectorState();
}

class _PlanetSelectorState extends State<PlanetSelector> {
@override
Widget build(BuildContext context) {
return Container(
width: widget.width,
height: widget.height,
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(2.0),
child: Stack(children: [
BackdropFilter(
filter: ImageFilter.blur(sigmaX: 2, sigmaY: 2),
child: Container(),
return Material(
color: Colors.transparent,
child: InkWell(
onTap: (){
widget.onPressed();
},
child: Container(
width: widget.width,
height: widget.height,
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(2.0),
child: Stack(children: [
BackdropFilter(
filter: ImageFilter.blur(sigmaX: 2, sigmaY: 2),
child: Container(),
),
Container(
height: double.infinity,
width: widget.width*0.8,
decoration: BoxDecoration(
border: Border.all(
color: Colors.white.withOpacity(0.1)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20.0),
bottomLeft: Radius.circular(20.0)),
gradient: LinearGradient(colors: [
Colors.white.withOpacity(0.25),
Colors.white.withOpacity(0.05)
])
),
child: FittedBox(
fit: BoxFit.fill,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 8.0),
child: Text(
"EARTH",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold),
),
),
),
),
]),
),
Container(
height: double.infinity,
width: widget.width*0.8,
decoration: BoxDecoration(
border: Border.all(
color: Colors.white.withOpacity(0.1)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20.0),
bottomLeft: Radius.circular(20.0)),
gradient: LinearGradient(colors: [
Colors.white.withOpacity(0.25),
Colors.white.withOpacity(0.05)
])
),
child: FittedBox(
fit: BoxFit.fill,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 8.0),
child: Text(
"EARTH",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold),
),
height: 150.0,
width: 2.0,
color: Colors.white,
),
Expanded(
child: Container(
child: FittedBox(
fit: BoxFit.fitWidth,
child: Icon(Icons.arrow_drop_up_rounded,
size: widget.height*0.8, color: Colors.white),
),
),
),
]),
),
Container(
height: 150.0,
width: 2.0,
color: Colors.white,
),
Expanded(
child: Container(
child: FittedBox(
fit: BoxFit.fitWidth,
child: Icon(Icons.arrow_drop_up_rounded,
size: widget.height*0.8, color: Colors.white),
),
),
],
),
],
),
),
);
}
Expand Down
Loading

0 comments on commit b9b54f7

Please sign in to comment.