Skip to content

Latest commit

 

History

History

clientsample

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

clientsample

This is the client-side Flutter example project for the Flutter version (that runs in all platforms: android, ios, web, macos, windows, linux) of NETCoreSync. This client-side example works in conjunction with its server-side example here. Read more about the Flutter version of NETCoreSync in the netcoresync_moor's README.

Getting Started

  • Ensure the latest Flutter SDK is installed.
  • This example uses the netcoresync_moor package, which is built on top of Moor package, so it is required to be able to run with Moor requirements first. All platforms in this project are already compliant with what Moor requires (full documentation in here). The following are additional notes for the platform that you're going to run this project with:
    • macos, android, ios, web: no further configuration is neccesary.
    • windows: As stated in the Moor's windows documentation here, your windows platform needs to have the sqlite3.dll file to work correctly. Please read the documentation link for further information.
    • linux: As stated in the Moor's linux documentation here, your linux platform needs to have the libsqlite3.so file to work correctly. Please read the documentation link for further information.
  • Clone this project to your local machine: git clone https://github.com/aldycool/NETCoreSync.git.
  • Navigate to the clientsample folder and run the app:
    cd NETCoreSync/Samples/ServerTimeStamp/clientsample
    flutter pub get
    flutter run # Flutter will present options here if you have multiple devices
  • When the application has launched, we can try inserting data and other database operations here. But, before proceeding with the synchronization function inside the application, ensure that the its server-side example here is successfully launched first. Take note of the server's listening URL as this URL is going to be used as the Sync Url parameter inside the client application. For example, if the server's listening URL is: https://localhost:5001, then the Sync Url would be: wss://localhost:5001/netcoresyncserver (assuming the WebSocket path is not changed and still in default).

For more details on the client-side and server-side configuration, read the Flutter version of NETCoreSync in the netcoresync_moor's README.