Skip to content

TuMicro/tuboleto-polygon-ui

Repository files navigation

Overview

This repo contains the UX/UI and logic modifications relating the Polygon (MATIC) top-up compatibility and BUS token rewards built during the Polygon BUIDL IT Hackathon.

This was built using the flutter framework.

The codebase here interacts with the Polygon connector:

Development

In case of ndk related issues

https://stackoverflow.com/questions/35128229/error-no-toolchains-found-in-the-ndk-toolchains-folder-for-abi-with-prefix-llv#:~:text=If%20you%20see%20an%20error,Android%20Studio%203.1%20or%20newer.

On automatic code generation

Each time you modify/create/delete a file inside the folders api or model, you must run:

flutter pub run build_runner watch --delete-conflicting-outputs

About routes

After creating new routes we need to rebuild the app in order to recognize the routes correctly.

About assets

Sometimes after adding assets (images or icons) we need to rebuild the app in order to be able to use them.

How to copy POJOs (or value objects) from java

  1. Use this website to generate the dart code: http://sma.github.io/stuff/java2dartweb/java2dartweb.html
  2. Use this regex to generate the boilerplate in android studio
class (\w+)\s*\{([^}]+)\}
@JsonSerializable(explicitToJson: true)\nclass $1 {\n$2\n  $1();\n\n  factory $1.fromJson(Map json) => _\$$1FromJson(json);\n  Map<String, dynamic> toJson() => _\$$1ToJson(this);\n}
  1. Generate code, check the first command in this guide.

BuildConfig.DEBUG equivalent

import 'package:flutter/foundation.dart' as Foundation; !Foundation.kReleaseMode

Debug analytics

Use this guide and then open the debug view in the firebase console

For being able to use debugView in IOS you must build and run the app with xcode.

Some common IOS problems:

If errors with linker or clang: error: linker command failed with exit code 1, remember this guy forever: OneSignal/OneSignal-Flutter-SDK#42 (comment)

Sometimes vscode doesn't reload code (after I compiled with xcode), so you need to use xcode to compile, debug.

PD: to add libraries just click the "plus" button in xcode and choose the libraries

About the search bar for cupertino

An example of how to construct an Cupertino-style search bar. The Flutter team is working on an official widget for this. Once that effort is complete, developers will not need to roll their own search bars, so to speak.

Utils

En Google Cloud SDK Shell

gcloud auth application-default login

Showing the commits tree:

git log --oneline --graph --decorate --all

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published