Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
750834c
made the dialog take in strings not widgets. Replaced where it showed…
i-kumar Mar 19, 2026
85460d4
added variable corner radius
i-kumar Mar 19, 2026
a237155
reverted menu button change
i-kumar Mar 20, 2026
291e6e3
Removing multiple spaces in stop names
kurz3m3 Mar 20, 2026
ce4038f
fixed syntax
i-kumar Mar 21, 2026
cd76f66
Merge pull request #64 from mbusdev/46-real-border-radiusing
TheStaticBits Mar 21, 2026
1d13a08
removing "%" from stop names
kurz3m3 Mar 21, 2026
87e4695
refresh auto
Mar 21, 2026
3b855b2
remove styles as they aren't being used, modify sizes to match existi…
Mar 21, 2026
288a3fd
Merge pull request #67 from mbusdev/fixing-stop-names-formatting
i-kumar Mar 23, 2026
3a4800b
Merge pull request #69 from mbusdev/route-icon-widget-integration
i-kumar Mar 23, 2026
6cb6295
undid change
i-kumar Mar 23, 2026
6a6db2c
undid change
i-kumar Mar 23, 2026
ebc2738
Added center map and fixed compile error
gusrod-coder Mar 23, 2026
9e849cc
Fixed Centering Infinite Loop
gusrod-coder Mar 23, 2026
0151224
fixed comma
i-kumar Mar 23, 2026
9690a45
fixed bug by adding empty sizedbox()
sahusw Mar 25, 2026
3a6da16
persistent favorited stops
TheStaticBits Mar 25, 2026
13c1828
swapped: text -> dialogue widget: resolving gradle issues (my end pro…
Pronkle Mar 25, 2026
c1dd3e2
Merge branch 'collapsing-flow' into maizebus-2.1
i-kumar Mar 27, 2026
e5000fa
fixed bug with the going out app
Mar 28, 2026
4c903be
Update mapscreen.dart
gusrod-coder Mar 28, 2026
79b7791
Update map_screen.dart
gusrod-coder Mar 28, 2026
a509eed
fix(ui): unfavoriting a ride stop turns stop blue
TheStaticBits Mar 28, 2026
fa79a05
perf(ui): turned stop vars into maps from stopID to marker, removing …
TheStaticBits Mar 28, 2026
a485901
bus fix changes
Pronkle Mar 28, 2026
eb17d3b
working and tested version of bus not found replacement popup
Pronkle Mar 28, 2026
65f9adc
Removed a debug print I found
Pronkle Mar 28, 2026
bbd9a67
Merge branch '47-modify-maizebusdialog-to-take-in-strings-not-widgets…
i-kumar Apr 3, 2026
b686802
Merge branch 'refresh-branch' into maizebus-2.1
i-kumar Apr 3, 2026
7cf119b
Merge branch 'Center-on-start' into maizebus-2.1
i-kumar Apr 3, 2026
7292cb2
Merge pull request #80 from mbusdev/offline-bus-clickfix
i-kumar Apr 7, 2026
703f55d
fix(ui): Made StopSheet favorite button load instantly
TheStaticBits Apr 8, 2026
28324d5
Merge branch 'maizebus-2.1' into persistent-favorite-stops
TheStaticBits Apr 8, 2026
c7ca3cd
fix(ui): Fixed a merge bug resulting from other commits in maizebus-2.1
TheStaticBits Apr 8, 2026
d931f7d
Merge pull request #78 from mbusdev/persistent-favorite-stops
iswheeler Apr 9, 2026
7b36053
Got stops, lines, and buses appearing!
iswheeler Apr 12, 2026
cbf7ab0
Started implementing SmoothBus
iswheeler Apr 16, 2026
ecd9d90
Fixed some animations and polylines
iswheeler Apr 18, 2026
8f40588
Added journeys to compositemapwidget
iswheeler Apr 29, 2026
cea197a
Fixed the extra-long detour bug
iswheeler May 7, 2026
77a6756
Finally fixed (hopefully) invalid markers
iswheeler May 11, 2026
891f691
Cleaned up code
iswheeler May 11, 2026
4b986c1
Added RepaintBoundary
iswheeler May 31, 2026
0a90b70
Added a basic framework
iswheeler Jun 6, 2026
e158ea8
Update navigation_manager.dart
gusrod-coder Jun 6, 2026
31b887c
Added NavigationManager to map screen
iswheeler Jun 7, 2026
6bde066
Merge branch 'main' into navigation-hub
iswheeler Jun 7, 2026
369e1e6
create draft of NavOnBus
jumpy-cat Jun 7, 2026
21ad9da
Added some base class variables to NavigationManager
iswheeler Jun 7, 2026
dcc016a
Merge branch 'navigation-hub' of https://github.com/mbusdev/bluebus-f…
iswheeler Jun 7, 2026
0d506c3
Update navigation_manager.dart
gusrod-coder Jun 14, 2026
9cb9c8e
Added extra notes
iswheeler Jun 21, 2026
28acfed
Merge branch 'navigation-hub' of https://github.com/mbusdev/bluebus-f…
gusrod-coder Jun 21, 2026
a69d75a
modified: lib/services/navigation/navigation_manager.dart
gusrod-coder Jun 21, 2026
147e3c3
Added example classes
iswheeler Jun 22, 2026
5bf506c
Merge branch 'navigation-hub' of https://github.com/mbusdev/bluebus-f…
iswheeler Jun 22, 2026
6fcfe24
Got base stage switching working!
iswheeler Jun 23, 2026
b7757c0
Added default gray color
iswheeler Jun 23, 2026
e464240
Removed extra debug logs
iswheeler Jun 23, 2026
fc45e4f
feat, refactor: consolidate geometric helpers into a separate file, a…
Jun 23, 2026
222935d
feat: get mock journey from mock backend
jumpy-cat Jun 23, 2026
2a67de0
oops class from prior
Pronkle Jun 23, 2026
fce3cf9
updates for oops class
Pronkle Jun 23, 2026
19d7a03
Merge branch 'navigation-hub' of github.com:mbusdev/bluebus-flutter i…
Pronkle Jun 23, 2026
c4a1423
staged changes... see prior commit message
Pronkle Jun 24, 2026
bc94735
Merge remote-tracking branch 'origin/navigation-hub' into navigation-hub
jumpy-cat Jun 25, 2026
4561e84
Added prelimiary marker/polyline support
iswheeler Jun 25, 2026
2bf736a
Merge branch 'navigation-hub' of https://github.com/mbusdev/bluebus-f…
iswheeler Jun 25, 2026
7187f1d
Finished demo stage!
iswheeler Jun 28, 2026
906a27c
talking to overlay widget
Pronkle Jun 28, 2026
1325f6e
additions to navigation manager class to communicate with the overlay…
Pronkle Jun 28, 2026
37e07cb
fix issue with multi-subroute routes being represented poorly in rout…
jumpy-cat Jun 28, 2026
1dad022
overlay widget modifications to talk to nav hub
Pronkle Jun 28, 2026
569cf85
nav manager changes pt 2.
Pronkle Jun 28, 2026
7aa6b96
resolving some pull issues with this
Pronkle Jun 28, 2026
041279f
modified: lib/bluebus_api.dart
gusrod-coder Jun 28, 2026
5bf08b6
Merge branch 'navigation-hub' of https://github.com/mbusdev/bluebus-f…
gusrod-coder Jun 28, 2026
0be1340
Revert "Merge branch 'navigation-hub' of https://github.com/mbusdev/b…
gusrod-coder Jun 28, 2026
410873d
Revert " modified: lib/bluebus_api.dart"
gusrod-coder Jun 28, 2026
750c6b2
modified: lib/screens/map_screen.dart
gusrod-coder Jun 28, 2026
544ca17
Finished demo stage! + navigation layer wiring
iswheeler Jun 28, 2026
29a05d1
Fixed merge mess
iswheeler Jun 28, 2026
95a3722
feat: adding walking-stage (still work in progress)
sahusw Jun 29, 2026
891407f
Started implementation of stage events stream
iswheeler Jun 30, 2026
ce0413b
Add Settings for Centering Position
gusrod-coder Jul 5, 2026
bda449e
widget additions to support communication to the navhub
Pronkle Jul 5, 2026
9e41179
Merge branch 'navigation-hub' of github.com:mbusdev/bluebus-flutter i…
Pronkle Jul 5, 2026
fe1dff8
dunno what happened to my missed stage earlier, think it got erased s…
Pronkle Jul 5, 2026
6f7953c
fix: resolve FIXME w/ graph traversal of routes
jumpy-cat Jul 5, 2026
5f7674b
Big concerning merge done hunk by hunk
jumpy-cat Jul 5, 2026
8c5e227
fix: make it compile again
jumpy-cat Jul 5, 2026
cd64958
Merge branch 'navigation-hub-temp' into navigation-hub
jumpy-cat Jul 5, 2026
9fc5cf8
modified: lib/screens/map_screen.dart
gusrod-coder Jul 12, 2026
ddaa198
Merge branch 'navigation-hub' of https://github.com/mbusdev/bluebus-f…
gusrod-coder Jul 12, 2026
75ea2d3
Added initWithLeg code
iswheeler Jul 15, 2026
96697d1
Merge branch 'navigation-hub' of https://github.com/mbusdev/bluebus-f…
iswheeler Jul 15, 2026
2c8278f
Added preliminary support for stage steps
iswheeler Jul 16, 2026
f9574bc
modified: lib/widgets/map_widget.dart
gusrod-coder Jul 23, 2026
67c68b1
Merge branch 'navigation-hub' of https://github.com/mbusdev/bluebus-f…
gusrod-coder Jul 23, 2026
e7b7f36
Spruced up steps UI
iswheeler Jul 23, 2026
0749bc4
Merge branch 'navigation-hub' of https://github.com/mbusdev/bluebus-f…
iswheeler Jul 23, 2026
6e67be9
staged minor changes
Pronkle Jul 24, 2026
31c5949
Merge branch 'navigation-hub' of github.com:mbusdev/bluebus-flutter i…
Pronkle Jul 24, 2026
18452af
Freshened up UI, started init from /plan-journey
iswheeler Jul 24, 2026
f5d73ac
Merge branch 'navigation-hub' of github.com:mbusdev/bluebus-flutter i…
Pronkle Jul 25, 2026
81e1ada
Adding UI for whatbusyouareon popup, includes button for missed case
Pronkle Jul 26, 2026
218f6fa
progress on pop up prompt for which bus you are on + missed bus option
Pronkle Jul 26, 2026
1dd4660
Started floorplan overlay, enabled nav transparency
iswheeler Jul 26, 2026
1287553
mock data for UI display currently
Pronkle Jul 26, 2026
cb7ceda
Merge branch 'navigation-hub' of github.com:mbusdev/bluebus-flutter i…
Pronkle Jul 26, 2026
a0c19aa
commented out missed stage and accomodated changes for UI display in …
Pronkle Jul 26, 2026
85f44c0
Walking stage: initWithLeg() & getFixedTitle()
TheStaticBits Aug 2, 2026
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
19 changes: 10 additions & 9 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require(flutter.compileSdkVersion >= 35);
android {
namespace = "com.ishankumar.maizebus"
compileSdk = flutter.compileSdkVersion
ndkVersion = "28.1.13356709"
ndkVersion = "28.2.13676358"

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
Expand All @@ -38,9 +38,7 @@ android {
isCoreLibraryDesugaringEnabled = true
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
// REMOVED compilerOptions from here because it was causing "Unresolved reference"

defaultConfig {
applicationId = "com.ishankumar.maizebus"
Expand Down Expand Up @@ -73,15 +71,18 @@ android {
}
}

// BULLETPROOF FIX: Configure Kotlin compiler tasks directly at the bottom of the file
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11)
}
}

dependencies {
// the following two might be needed if issues happen
// https://pub.dev/packages/flutter_local_notifications#-android-setup
// implementation("androidx.window:window:1.0.0")
// implementation("androidx.window:window-java:1.0.0")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
implementation(platform("com.google.firebase:firebase-bom:34.6.0"))
}

flutter {
source = "../.."
}
}
2 changes: 1 addition & 1 deletion android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
id("com.google.gms.google-services") version("4.3.15") apply false
// END: FlutterFire Configuration

id("org.jetbrains.kotlin.android") version "2.1.0" apply false
id("org.jetbrains.kotlin.android") version "2.3.10" apply false
}

include(":app")
Binary file added assets/destination.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/start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 19 additions & 39 deletions lib/bluebus_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,7 @@ import 'models/bus_stop.dart';
import 'models/bus.dart';
import 'models/bus_route_line.dart';
import 'services/route_color_service.dart';
import 'package:bluebus/widgets/dialog.dart';

// Function to calculate rotation angle between two geographical points
// (used for bus stop icon orientation)
double pointRotation(double lat1, double lon1, double lat2, double lon2) {
const double degToRad = 0.017453292519943295; // π / 180
const double radToDeg = 57.29577951308232; // 180 / π

double dLat = lat2 - lat1;
double dLon = lon2 - lon1;

// Scale longitude by cos(lat) to correct for east-west distance
double x = dLon * (Math.cos(lat1 * degToRad));
double y = dLat;

double angle = Math.atan2(x, y) * radToDeg;

// Normalize to [0, 360)
if (angle < 0) angle += 360;

return angle;
}
import 'utils/geometry.dart';

class BlueBusApi {
static const String baseUrl = BACKEND_URL;
Expand All @@ -48,7 +27,7 @@ class BlueBusApi {
for (final subroute in subroutes) {
try {
final points = <LatLng>[];
final stops = <BusStop>[];
final stops = <(int, BusStop)>[];

// Cast to list to be able to be able to get different elements
final pointList = subroute['pt'] as List;
Expand All @@ -64,27 +43,25 @@ class BlueBusApi {
);
if (point['typ'] == 'S') {
// get rotation of stop
if (isLast){
double stopRotation;
if (isLast) {
// use the previous 2 points to calculate rotation
double stopRotation = pointRotation(
stopRotation = pointRotation(
pointList[i - 2]['lat']?.toDouble() ?? 0,
pointList[i - 2]['lon']?.toDouble() ?? 0,
pointList[i - 1]['lat']?.toDouble() ?? 0,
pointList[i - 1]['lon']?.toDouble() ?? 0,
);
stops.add(BusStop.fromJson(point, routeId, stopRotation, false));

} else {
// use the next 2 points to calculate rotation
double stopRotation = pointRotation(
stopRotation = pointRotation(
pointList[i + 1]['lat']?.toDouble() ?? 0,
pointList[i + 1]['lon']?.toDouble() ?? 0,
pointList[i + 2]['lat']?.toDouble() ?? 0,
pointList[i + 2]['lon']?.toDouble() ?? 0,
);
stops.add(BusStop.fromJson(point, routeId, stopRotation, false));
}

stops.add((i, BusStop.fromJson(point, routeId, stopRotation, false)));
}
}

Expand All @@ -105,7 +82,7 @@ class BlueBusApi {
// Handle detour points if present
if (subroute.containsKey('dtrpt')) {
final detourPoints = <LatLng>[];
final detourStops = <BusStop>[];
final detourStops = <(int, BusStop)>[];

// Cast to list to be able to be able to get different elements
final detourPointList = subroute['dtrpt'] as List;
Expand All @@ -122,26 +99,26 @@ class BlueBusApi {
);
if (point['typ'] == 'S') {
// get rotation of stop
if (isLast){
double stopRotation;
if (isLast) {
// use the previous 2 points to calculate rotation
double stopRotation = pointRotation(
stopRotation = pointRotation(
detourPointList[i - 2]['lat']?.toDouble() ?? 0,
detourPointList[i - 2]['lon']?.toDouble() ?? 0,
detourPointList[i - 1]['lat']?.toDouble() ?? 0,
detourPointList[i - 1]['lon']?.toDouble() ?? 0,
);
detourStops.add(BusStop.fromJson(point, routeId, stopRotation, false));

} else {
// use the next 2 points to calculate rotation
double stopRotation = pointRotation(
stopRotation = pointRotation(
detourPointList[i + 1]['lat']?.toDouble() ?? 0,
detourPointList[i + 1]['lon']?.toDouble() ?? 0,
detourPointList[i + 2]['lat']?.toDouble() ?? 0,
detourPointList[i + 2]['lon']?.toDouble() ?? 0,
);
detourStops.add(BusStop.fromJson(point, routeId, stopRotation, false));
}
detourStops.add((i, BusStop.fromJson(point, routeId, stopRotation, false)));
}
}

Expand All @@ -166,7 +143,9 @@ class BlueBusApi {
// Fetch all buses and their positions
static Future<List<Bus>> fetchBuses() async {
try {
final response = await http.get(Uri.parse('$baseUrl/getVehiclePositions'));
final response = await http.get(
Uri.parse('$baseUrl/getVehiclePositions'),
);
if (response.statusCode != 200) throw Exception('Failed to load buses');
final data = jsonDecode(response.body);
final buses = <Bus>[];
Expand All @@ -191,10 +170,11 @@ class BlueBusApi {
}

return buses;
} catch (e){

} catch (e) {
// on error return a blank list
return [];
}
}
}

// TODO: Make bus routes have better fallback, so if one route fails to be processed it doesn't tank the rest of them
Loading