पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv2.0.5

fluro

Fluro एक नल-सेफ फ्लटर रूटिंग लाइब्रेरी है जो वाइल्डकार्ड, नामित पैरामीटर और स्पष्ट रूट परिभाषाओं जैसे लचीले रूटिंग विकल्प जोड़ती है।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
23.2 हज़ार
लाइक
891
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add fluro

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

Fluro एक नल-सुरक्षित Flutter रूटिंग लाइब्रेरी है जो लचीले रूट कॉन्फ़िगरेशन के साथ नेविगेशन को सरल बनाने के लिए डिज़ाइन की गई है। यह वाइल्डकार्ड, नामित पैरामीटर और साफ, घोषणात्मक रूट परिभाषाओं का समर्थन करता है, जिससे बहुत अधिक प्लेटफॉर्मों पर जटिल नेविगेशन फ्लो को प्रबंधित करना आसान हो जाता है। डायनामिक रूटिंग पैटर्न की आवश्यकता वाले ऐप्स के लिए आदर्श, Fluro कोड की पठनीयता और रखरखाव में सुधार करता है। इसकी हल्की प्रकृति और Android, iOS, Web, macOS, Windows और Linux के साथ संगतता इसे आधुनिक Flutter ऐप्स के लिए एक विविध विकल्प बनाती है।

उपयोग

  • गतिशील रूट के साथ जटिल नेविगेशन
  • पैरामीटरीकृत URL रूटिंग
  • क्रॉस-प्लेटफ़ॉर्म ऐप नेविगेशन
  • मॉड्यूलर ऐप आर्किटेक्चर
  • गहरा लिंकिंग समर्थन
  • रूट लॉजिक का स्पष्ट अलगाव

मुख्य विशेषताएँ

  • वाइल्डकार्ड रूट मैचिंग
  • नामांकित पैरामीटर समर्थन
  • घोषणात्मक मार्ग परिभाषाएँ
  • नॉल-सेफ एपीआई
  • हल्का और कार्यक्षम
  • Platform-agnostic

इनके लिए उपयुक्त

  • उन्नत रूटिंग की आवश्यकता वाले विकासकर्मी
  • गहन लिंकिंग की आवश्यकता वाले ऐप्स
  • बड़े पैमाने पर Flutter प्रोजेक्ट
  • क्लीन कोड संरचना प्राथमिकता देने वाली टीमें
  • कई प्लेटफॉर्म के लक्षित प्रोजेक्ट्स

विचार योग्य बातें

  • हाथ से रूट पंजीकरण की आवश्यकता है
  • सीमित आंतरिक नेविगेशन स्थिति प्रबंधन
  • बेसिक नैविगेटर की तुलना में अधिक सीखने का वक्र
  • सक्रिय रूप से बनाए नहीं जा रहा है (अंतिम अद्यतन 2021)
  • समुदाय सहायता मुख्य रूप से गिटहब समस्याओं के माध्यम से

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

English | Português



The brightest, hippest, coolest router for Flutter.

Version Build Status

Features

  • Simple route navigation
  • Function handlers (map to a function instead of a route)
  • Wildcard parameter matching
  • Querystring parameter parsing
  • Common transitions built-in
  • Simple custom transition creation
  • Follows stable Flutter channel
  • Null-safety

Example Project

There is a pretty sweet example project in the example folder. Check it out. Otherwise, keep reading to get up and running.

Getting started

First, you should define a new FluroRouter object by initializing it as such:

final router = FluroRouter();

It may be convenient for you to store the router globally/statically so that you can access the router in other areas in your application.

After instantiating the router, you will need to define your routes and your route handlers:

var usersHandler = Handler(handlerFunc: (BuildContext context, Map<String, dynamic> params) {
  return UsersScreen(params["id"][0]);
});

void defineRoutes(FluroRouter router) {
  router.define("/users/:id", handler: usersHandler);

  // it is also possible to define the route transition to use
  // router.define("users/:id", handler: usersHandler, transitionType: TransitionType.inFromLeft);
}

In the above example, the router will intercept a route such as /users/1234 and route the application to the UsersScreen passing the value 1234 as a parameter to that screen.

Navigating

You can use FluroRouter with the MaterialApp.onGenerateRoute parameter via FluroRouter.generator. To do so, pass the function reference to the onGenerate parameter like: onGenerateRoute: router.generator.

You can then use Navigator.push and the flutter routing mechanism will match the routes for you.

You can also manually push to a route yourself. To do so:

router.navigateTo(context, "/users/1234", transition: TransitionType.fadeIn);

Class arguments

Don't want to use strings for params? No worries.

After pushing a route with a custom RouteSettings you can use the BuildContext.settings extension to extract the settings. Typically this would be done in Handler.handlerFunc so you can pass RouteSettings.arguments to your screen widgets.

/// Push a route with custom RouteSettings if you don't want to use path params
FluroRouter.appRouter.navigateTo(
  context,
  'home',
  routeSettings: RouteSettings(
    arguments: MyArgumentsDataClass('foo!'),
  ),
);

/// Extract the arguments using [BuildContext.settings.arguments] or [BuildContext.arguments] for short
var homeHandler = Handler(
  handlerFunc: (context, params) {
    final args = context.settings.arguments as MyArgumentsDataClass;

    return HomeComponent(args);
  },
);

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट