planets-flutter icon indicating copy to clipboard operation
planets-flutter copied to clipboard

Can not open planet detail page

Open vikbert opened this issue 6 years ago • 6 comments

Cant open the plant detail page, see screenshot, I am total new in flutter :-< screen shot 2018-07-15 at 11 39 58 pm

vikbert avatar Jul 15 '18 21:07 vikbert

me too.

pandagis avatar Aug 31 '18 03:08 pandagis

same here

jugidev avatar Sep 21 '18 12:09 jugidev

@sergiandreplace pls help

sooxt98 avatar Oct 18 '18 20:10 sooxt98

Same here.

xhidnoda avatar Nov 02 '18 19:11 xhidnoda

Change Routes.dart to :

import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:planets/ui/planet_detail/PlanetDetailPage.dart';

class Routes {
  static final Router _router = new Router();


  static var planetDetailHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, dynamic> params) {
      debugPrint(params["id"].toString().substring(1, params["id"].toString().length-1));
      return new PlanetDetailPage(params["id"].toString().substring(1, params["id"].toString().length-1));
    });

  static void initRoutes() {
    _router.define("/detail/:id", handler: planetDetailHandler);
  }

  static void navigateTo(context, String route, {TransitionType transition}) {
    _router.navigateTo(context, route, transition: transition);
  }

}

IAmSarthakVerma avatar Nov 17 '18 09:11 IAmSarthakVerma

Thanks, working with @IAmSarthakVerma solution. You should PR this fix

HZooly avatar Nov 23 '18 21:11 HZooly