flutter_feathersjs 4.1.2 copy "flutter_feathersjs: ^4.1.2" to clipboard
flutter_feathersjs: ^4.1.2 copied to clipboard

Communicate with your feathers js server from flutter app with unbelieved ease and make happy your customers.

🐦 flutter_feathersjs 🐦 #

🚀 *We're are working on the next release of this Project: 🎯 Version 5.0.0

👏 I use "We" becauase https://github.com/AurelAgbodoyetin joined me to maintain and make great again this package.

See our roadmap here: https://github.com/Dahkenangnon/flutter_feathersjs.dart/issues/52


GitHub Repo stars pub version GitHub last commit

FlutterFeathersJs Icon
Communicate with your feathers js server from flutter app with unbelieved ease and make happy your customers.


Infos: Feathers js is a node framework for real-time applications and REST APIs.


Simple to use #

1. Install it #

# Please see https://pub.dev/packages/flutter_feathersjs/install
flutter_feathersjs: ^lastest

2. Import it #

// Import it
import 'package:flutter_feathersjs/flutter_feathersjs.dart';

3. Initialize it as single instance #



    //your  api baseUrl
    const BASE_URL = "https://your-feathersjs-server.com";

    // Init it globally across your app, maybe with get_it or something like that
    FlutterFeathersjs flutterFeathersjs = FlutterFeathersjs()..init(baseUrl: BASE_URL);

    // Authenticate with email/password
    var response = await flutterFeathersjs.authenticate(userName: user["email"], password: user["password"]);
    print(response);

    // ReAuthenticated with token
    var response = await flutterFeathersjs.reAuthenticate();
    print(response);

    // Get authenticated user
    var response = await flutterFeathersjs.user();

4. Configure and use only socketio or rest client #


    // Standalone socket io client
    FlutterFeathersjs socketIOClient = FlutterFeathersjs();

    // Socket.io client
     IO.Socket io = IO.io(BASE_URL);
    socketIOClient.configure(FlutterFeathersjs.socketioClient(io));

    // Auth socketio client 

    var response = await socketIOClient.authenticate(userName: user["email"], password: user["password"]);
    print(response);

    // ReAuth socketio client
    var reAuthResponse = await socketIOClient.reAuthenticate();
    
    // Create a message using socketio standalone client
    var ioResponse = await socketIOClient.service('messages').create({"text": 'A new message'});

    // Get the authenticated user 
    var userResponse = await socketIOClient.user();


    //StandAlone rest client
    FlutterFeathersjs restClient = FlutterFeathersjs();
    Dio dio = Dio(BaseOptions(baseUrl: BASE_URL));
    restClient.configure(FlutterFeathersjs.restClient(dio));


    // Authenticate user using rest client
    var response = await restClient.authenticate( userName: user["email"], password: user["password"]);
      print(response);

    // Reauthenticate user using rest client
    var reAuthResponse = await restClient.reAuthenticate();

    // Call service 
    var restResponse = await restClient.service('messages').create({"text": 'A new message'});


    // Get the authenticated user
    var user = await restClient.user();


You're ready to go: 3, 2, 1 🚀 Checkout the doc for more info.

Documentation #

Check it out at: https://dahkenangnon.github.io/flutter_feathersjs.dart/

Support #

Please email to dah.kenangnon (at) gmail (dot) com if you have any questions or comments or business support.

Contributing #

Please feel free to contribute to this project by opening an issue or creating a pull request.

15
likes
0
pub points
54%
popularity

Publisher

verified publisherdah-kenangnon.com

Communicate with your feathers js server from flutter app with unbelieved ease and make happy your customers.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

dio, event_bus, flutter, json_bridge, socket_io_client

More

Packages that depend on flutter_feathersjs