Skip to content

drsarutobi8/studentgrade_web

Repository files navigation

starter

A new Flutter project.

Getting Started

To make it works with GRPC you need to Disable CORS

  1. Go to flutter\bin\cache and remove a file named: flutter_tools.stamp
rm ~/snap/flutter/common/flutter/bin/cache/flutter_tools.stamp
  1. Go to flutter\packages\flutter_tools\lib\src\web and open the file chrome.dart. (for linux is at
vi ~/snap/flutter/common/flutter/packages/flutter_tools/lib/src/web/chrome.dart
  1. Find '--disable-extensions'
  2. Add '--disable-web-security',
flutter run -d chrome --web-port=4200 --web-renderer=html

This project is a starting point for a Flutter application.

Regenerate the stubs

Installation protoc compiler

  • Download binary from here
  • unzip to /usr/lib/protoc-xxxx
  • ln -s /usr/lib/protoc-xxxx protoc

  • edit /etc/profile
    • add PROTOC_PATH pointing to /usr/lib/protoc and export it
    • add $PROTOC_HOME/bin in PATH

Installation protoc web compiler

  • Download binary from here
$ sudo mkdir protoc-gen-grpc-web-xxx
$ sudo mkdir protoc-gen-grpc-web-xxx/bin
$ sudo mv ~/Downloads/protoc-gen-grpc-web-xxx /usr/lib/protoc-gen-grpc-web-xxx/bin/protoc-gen-grpc-web
$ sudo chmod +x /usr/lib/protoc-gen-grpc-web-xxx/bin/protoc-gen-grpc-web-xxx
$ sudo ln -s /usr/lib/protoc-gen-grpc-web-xxx /usr/lib/protoc-gen-grrc-web
  • edit /etc/profile
    • add PROTOC_WEB_PATH pointing to /usr/lib/protoc_web and export it
    • add $PROTOC_WEB_HOME/bin in PATH
  • edit ~/.bashrc
    • add ~/.pub-cache/bin to your PATH,
$ mkdir lib/grpc_stub
$ protoc --dart_out=grpc:lib/grpc_stub/ -I./protos ./protos/*.proto google/protobuf/timestamp.proto
$ mkdir -p js/dist/proto
$ protoc -I . echo.proto --js_out=import_style=commonjs:./js/dist/proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./js/dist/proto

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published