# Cross-platform site built with Flutter on ICP?

**URL:** <https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726>\
**Category:** Programs & Applications\
**Created:** [May 14, 2024, 1:20am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726 "2024-05-14T01:20:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwsteel](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wwsteel](https://forum.dfinity.org/u/wwsteel)\
**Post date:** [May 14, 2024, 1:20am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/1 "2024-05-14T01:20:12Z")

</div>

So is it possible to build a cross-platform site with a low or no-code builder like Flutter, so that the site can be easily accessed with Android or iphone, tablet, mobile, PC, iOS…and have that site fully on chain on ICP?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [May 14, 2024, 7:51am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/2 "2024-05-14T07:51:00Z")

</div>

Any site that works with static file hosting works on ICP. It may require some scripting to get the built files in the right place, but it’s not hard

---

<div class="post-metadata">

**Author:** ![wwsteel](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wwsteel](https://forum.dfinity.org/u/wwsteel)\
**Post date:** [May 15, 2024, 11:40am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/3 "2024-05-15T11:40:37Z")

</div>

Would a Facebook clone site work with static file hosting?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [May 15, 2024, 11:43am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/4 "2024-05-15T11:43:40Z")

</div>

User-generated content usually is not handled with static files. For that I would say that you need to write some code yourself, for which you need to at least grasp the basics of ICP and its technologies

---

<div class="post-metadata">

**Author:** ![wwsteel](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wwsteel](https://forum.dfinity.org/u/wwsteel)\
**Post date:** [May 15, 2024, 12:06pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/5 "2024-05-15T12:06:24Z")

</div>

So am I able to list potential job here for ICP devs?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [May 16, 2024, 7:49am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/6 "2024-05-16T07:49:41Z")

</div>

I don’t see a problem with it 🙂

---

<div class="post-metadata">

**Author:** ![bitdivine](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bitdivine/32/246_2.png) [@bitdivine](https://forum.dfinity.org/u/bitdivine)\
**Post date:** [May 27, 2024, 10:22pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/7 "2024-05-27T22:22:17Z")

</div>

Fun fact: The first version of [https://nns.ic0.app](https://nns.ic0.app) was written in flutter. We migrated away from it but I know that flutter has matured so maybe it’s a great choice by now.

Which low code builder were you thinking of using? FlutterFlow?

---

<div class="post-metadata">

**Author:** ![wwsteel](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wwsteel](https://forum.dfinity.org/u/wwsteel)\
**Post date:** [May 28, 2024, 1:09am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/8 "2024-05-28T01:09:22Z")

</div>

Yes, I was hoping to use Flutterflow, but I need to know the code and how to add it for this workflow to be successful. Any suggestions?

---

<div class="post-metadata">

**Author:** ![bitdivine](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bitdivine/32/246_2.png) [@bitdivine](https://forum.dfinity.org/u/bitdivine)\
**Post date:** [May 28, 2024, 5:00am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/9 "2024-05-28T05:00:13Z")

</div>

Our experience of using flutter was such along time ago that I can’t really say. You will presumably still need ic-agent to be able to make API calls and manage login session delegations. We used the javascript library for that, and Flutter’s ability to call out to js.

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [May 28, 2024, 5:38am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/10 "2024-05-28T05:38:07Z")

</div>

To my knowledge, there is indeed no native Flutter library for this purpose (please correct me if this is no longer accurate), and you would need to access the IC through a JavaScript bridge.

Something like: Flutter activity \<\> JS \<\> IC.

---

<div class="post-metadata">

**Author:** ![wwsteel](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wwsteel](https://forum.dfinity.org/u/wwsteel)\
**Post date:** [May 28, 2024, 12:07pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/11 "2024-05-28T12:07:41Z")

</div>

Ok, so is there any pre-made javascript available somewhere to bridge from the Flutterflow site to IC?

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [May 28, 2024, 12:27pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/12 "2024-05-28T12:27:34Z")

</div>

For the bridge itself I’m not aware of any ready made solution but aware if anybody in the community has build one, please say so.

Regarding the JavaScript interaction with the IC the communication layer is agent-js ([https://github.com/dfinity/agent-js/](https://github.com/dfinity/agent-js/)) and there are a bunch of libraries that ease the interaction with the IC and various well-known canisters types ([https://github.com/dfinity/ic-js](https://github.com/dfinity/ic-js)).

---

<div class="post-metadata">

**Author:** ![wwsteel](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wwsteel](https://forum.dfinity.org/u/wwsteel)\
**Post date:** [May 28, 2024, 12:42pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/13 "2024-05-28T12:42:10Z")

</div>

Thanks for the info!  
And yeah…if any dev has already been down this road…I as a no-coder would be happy to talk and discuss payment for such code

---

<div class="post-metadata">

**Author:** ![levi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/levi/32/22608_2.png) [@levi](https://forum.dfinity.org/u/levi)\
**Post date:** [May 28, 2024, 5:49pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/14 "2024-05-28T17:49:20Z")

</div>

There is a native Dart and Flutter library agent [ic\_tools | Dart package](https://pub.dev/packages/ic_tools) (does not use agent-js) that works for Dart/Flutter on the Web and on desktop Linux. I am using it for 2+ years now, it is awesome.

A quick search shows you can integrate packages into FlutterFlow using Custom Actions or Custom Widgets [Custom Code - Deep Dive | FlutterFlow Docs](https://docs.flutterflow.io/flutter/custom-code-deep-dive).

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [May 28, 2024, 6:13pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/15 "2024-05-28T18:13:54Z")

</div>

Did not knew, that’s awesome! Thanks for the share

---

<div class="post-metadata">

**Author:** ![wwsteel](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wwsteel](https://forum.dfinity.org/u/wwsteel)\
**Post date:** [May 28, 2024, 11:55pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/16 "2024-05-28T23:55:37Z")

</div>

Would that Dart package also work for Flutterflow on mobile? iOS?

---

<div class="post-metadata">

**Author:** ![bitdivine](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bitdivine/32/246_2.png) [@bitdivine](https://forum.dfinity.org/u/bitdivine)\
**Post date:** [May 29, 2024, 9:59am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/17 "2024-05-29T09:59:57Z")

</div>

@levi That is super cool. Do you have any examples of current IC websites and/or apps using flutter?

---

<div class="post-metadata">

**Author:** ![wwsteel](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wwsteel](https://forum.dfinity.org/u/wwsteel)\
**Post date:** [May 30, 2024, 11:22am UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/18 "2024-05-30T11:22:57Z")

</div>

And, can a no-code site built with Flutterflow be 100% hosted on ICP? With a domain name such as “[Domain.com](http://Domain.com)”

---

<div class="post-metadata">

**Author:** ![levi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/levi/32/22608_2.png) [@levi](https://forum.dfinity.org/u/levi)\
**Post date:** [May 31, 2024, 8:32pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/19 "2024-05-31T20:32:40Z")

</div>

> [@wwsteel](#):
>
> Would that Dart package also work for Flutterflow on mobile? iOS?

Mobile and ios in the web browser yes.

For the apple app-store and android app-store it’s not set up out-of-the-box to work on those platforms at the moment. It could be set up to work on those platforms pretty easily for someone who needs, let me know if it is the case, I will be glad to point the direction and accept a PR for support for those platforms. I myself don’t have a need for android or apple app-stores. Note that the internet-computer cannot serve apps through the apple or android appstore. Only through the browser it can be 100% decentralized and on-chain.

> [@wwsteel](#):
>
> And, can a no-code site built with Flutterflow be 100% hosted on ICP? With a domain name such as “[Domain.com](http://Domain.com)”

If it is a web-app served through the browser then yes. Otherwise no.

---

<div class="post-metadata">

**Author:** ![levi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/levi/32/22608_2.png) [@levi](https://forum.dfinity.org/u/levi)\
**Post date:** [May 31, 2024, 9:00pm UTC](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726/20 "2024-05-31T21:00:48Z")

</div>

> [@bitdivine](#):
>
> @levi That is super cool. Do you have any examples of current IC websites and/or apps using flutter?

Hey @bitdivine, thanks! I was waiting for the repo to be made public and now it is! The best sample is the [CYCLES-TRANSFER-STATION](https://cycles-transfer-station.com/) Flutter frontend for which the source code is now public.

> **[GitHub - cycles-transfer-station/cts-frontcode](https://github.com/cycles-transfer-station/cts-frontcode)**
>
> Contribute to cycles-transfer-station/cts-frontcode development by creating an account on GitHub.

Featuring:

- PWA compatibility, add it to the home screen and it works just like a regular app,
- Internet-Identity login with a [single function call](https://pub.dev/documentation/ic_tools/latest/common_web/IICaller/login.html), using the SubtleCrypto web api for the session keys and `extractable: false` for the highest security. Also with the ability to [save](https://pub.dev/documentation/ic_tools/latest/common_web/IICaller/indexdb_save.html) and [load](https://pub.dev/documentation/ic_tools/latest/common_web/IICaller/indexdb_load.html) the SubtleCrypto session keys across browser sessions using IndexDB with a simple function call.
- Reproducible builds!

The CTS frontcode is the most up-to-date and comprehensive usage of the `ic_tools` dart library.

Documentation for the library is here: [ic\_tools - Dart API docs](https://pub.dev/documentation/ic_tools/latest/).

The `ic_tools` dart library is open-source: [GitHub - levifeldman/ic\_tools](https://github.com/levifeldman/ic_tools).

Let me know if you need specific examples for calling canisters or candid encoding/decoding, I can help.

[Next page](https://forum.dfinity.org/t/cross-platform-site-built-with-flutter-on-icp/30726.md?page=2)
