pocketbase_server_flutter 0.0.1 copy "pocketbase_server_flutter: ^0.0.1" to clipboard
pocketbase_server_flutter: ^0.0.1 copied to clipboard

Start Pocketbase Server directly from Android/IOS with flutter

Pocketbase Server Flutter #

Run Pocketbase Server directly from Android/IOS with flutter

Screenshot 2023-09-16 at 12 09 12 PM

Usage #

Checkout Pocketbase Server example app

Start pocketbaseServer

PocketbaseServerFlutter.start(
  hostName: await PocketbaseServerFlutter.localIpAddress,
  port: "8080",
  dataPath: null,
  enablePocketbaseApiLogs: true,
);

Stop pocketbaseServer

PocketbaseServerFlutter.stop();

Listen to pocketbaseServer events, setup eventCallback

PocketbaseServerFlutter.setEventCallback(
    callback: (event, data){
        // Handle event and data
    },
);

Some helper methods

// To check if pocketBase is running (not reliable)
PocketbaseServerFlutter.isRunning

// To check pocketbaseMobile version
PocketbaseServerFlutter.pocketbaseMobileVersion

// To get the ipAddress of mobile ( to run pocketbase with this hostname )
PocketbaseServerFlutter.localIpAddress

Setup #

  • IOS

If getting error related to Undefined symbol, Make sure to run pod install on ios directory, open IOS project in XCode

Click on Pods, Then select pocketbase_server_flutter from Targets list, and select Build Phases

Screenshot 2023-09-16 at 11 19 30 AM

Then in Link Binary With Libraries section, click on + button and search for libresolv.tbd and choose from result and click on Add

image

  • Android

Should work out of the box

Resources #

https://pocketbase.io/

Built with: pocketbase_mobile, pocketbase_android, pocketbase_ios

Note #

This is for running Pocketbase server from mobile, to connect with pocketbase server, use official pockebase client plugin

24
likes
150
pub points
44%
popularity

Publisher

verified publisherrohitsangwan.in

Start Pocketbase Server directly from Android/IOS with flutter

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on pocketbase_server_flutter