Skip to content

[GoRouter] initial location ignored when getInitialRoute is overridden in Android #132557

@opxdelwin

Description

@opxdelwin

Is there an existing issue for this?

Use case

From issue #132402

When initalRoute is mentioned in MainActivity.kt, GoRouter's initalRoute doesn't work. Implemeneted in 2275

package com.example.go_route.test_go_route

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
    override fun getInitialRoute(): String? {
        return "/home"
    }

}

Proposal

Implement a new optional bool parameter such as overridePlatformDefaultLocation, which would override platform set initial location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: proposalA detailed proposal for a change to Flutterp: go_routerThe go_router packagepackageflutter/packages repository. See also p: labels.r: duplicateIssue is closed as a duplicate of an existing issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions