Basic Usage
This section will guide you through the basic usage of the flutter_ping_wire
package. First, you need to configure your config file. The config file is a Yaml file that contains the configuration for your application. Here is an example of a config file:
clients:
first_client:
description: "This is simple client"
url: "https://b2de8312-cf06-40dd-81f6-116b761b66eb.mock.pstmn.io"
headers:
Authorization: "Bearer token"
loaders:
simple:
client: "first_client"
endpoint: "/simple"
method: "GET"
Next, you need to create a Dart file that will bootstrap your application. Here is an example of a Dart file that bootstraps your application:
import 'package:flutter/material.dart';
import 'package:flutter_ping/flutter_ping.dart';
void main() async{
WidgetsFlutterBinding.ensureInitialized();
final application = Application.getInstance();
await WireBootstrap(application).runApp("simple");
}
Last updated