Skip to content

Posts

FlutterのDropdownを使う

DropdownButton class - material library - Dart APIのサンプルを持ってきて、サンプルではchildとvalueを同じ文字列にしてるのを別々に指定できるようにして、とりあえずループ使わないで配列直接指定にしてみたら、エラー。 Assertion failed: file:///home/umemak/sdk/flutter/packages/flutter/lib/src/material/dropdown.dart:882:15 items == null || items.isEmpty || value == null || items.where((DropdownMenuItem<T> item) { return item.value == value; }).length == 1 "There should be exactly one item with [DropdownButton]'s value: One. \nEither zero or 2 or more [DropdownMenuItem]s were detected with the same value" dropdownV Read more

OracleにGoで接続する3

昨日は、mattn/go-oci8: Oracle driver for Go using database/sqlとsijms/go-ora: Pure go oracle clientを使ったサンプルをコンテナ上でgo runして動かしていた。 今日はgo buildでバイナリにして実行できるようにしてみる。 何もオプション付けずにビルドしたら、どちらも問題なし。 バイナリサ Read more

OracleサーバーのDockerイメージ

docker-images/OracleDatabase/SingleInstance at main · oracle/docker-imagesはクライアント側みたいにビルド済みイメージが用意されていないのかな、と思ったらOracle Container Registryにそれらしいものを見つけた。 Home > Database > express $ docker pull container-registry.oracle.com/database/express:latest サイズやばい $ docker images | grep ora oraclelinux 8 3bbe8a2c4b82 9 days ago 226MB oraclelinux 8-slim 1fcc1e6dda05 3 weeks ago 101MB container-registry.oracle.com/database/express latest e986fd612413 2 months ago 11.2GB $ docker run -d container-registry.oracle.com/database/express $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES Read more

OracleにGoで接続する

前の記事でsqlplusで接続できたので、Goのプログラムから接続してみる。 instantclientベースでGoをインストールするDockerfile作成 FROM ghcr.io/oracle/oraclelinux8-instantclient:21 RUN yum install -y wget tar RUN wget https://go.dev/dl/go1.18.3.linux-amd64.tar.gz RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz ENV PATH="${PATH}:/usr/local/go/bin" CMD [ "go", "version" ] docker-composeもそれを使うように修正 version: '3' services: db: image: container-registry.oracle.com/database/express ports: - 1521:1521 environment: - ORACLE_PWD=OraclePwd cli: build: . image: oraclegocli tty: true Read more

OracleにGoで接続する2

mattn/go-oci8: Oracle driver for Go using database/sqlでやってみる。 sh-4.4# go run go-oci8/main.go # pkg-config --cflags -- oci8 pkg-config: exec: "pkg-config": executable file not found in $PATH sh-4.4# yum install -y pkgconfig sh-4.4# go run go-oci8/main.go # pkg-config --cflags -- oci8 Package oci8 was not found in the pkg-config search path. Perhaps you should add the directory containing `oci8.pc' to the PKG_CONFIG_PATH environment variable Package 'oci8', required by 'virtual:world', not found pkg-config: exit status 1 とりあえずmain.goと同じところにoci8.pcを作成。中身はExamples。 sh-4.4# export PKG_CONFIG_PATH=. sh-4.4# go run go-oci8/main.go # github.com/mattn/go-oci8 cgo: C compiler "gcc" not found: exec: "gcc": Read more

FlutterでGeoChart

リクエスト受けてHTML組み立てて返すFirebase Functions作って、これをWebViewXで利用することで実現できた。 photomap/index.ts at main · umemak/photomap https://github.com/umemak/photomap/blob/c70f1a41038bd5a82edd72b63971ea83a393b41a/lib/MapDetailPage.dart#L140-L149 webview_flutter | Flutter PackageはAndroid/iOSしか対応していないみたいなので、あきらめた。

Flutterでお絵描きアプリ

どんな感じで作るのかなと思って、ググった。 Flutterで手書きを実装する - Qiita 【Flutter】Flutterでお絵かきアプリ(ペイント機能)の実装を紹介します | 株式会社イーガオ 【Flutter】お絵描きアプリを作ってみた - InheritedNotifier / CustomPainter DartPadで動くサンプルが用意されててすごい 【Flutter】Ge Read more

OracleのDockerイメージ

oracle/docker-images: Official source for Docker configurations, images, and examples of Dockerfiles for Oracle products and projects にまとめられている。 サーバー側:docker-images/OracleDatabase at main · oracle/docker-images クライアント側:docker-images/OracleInstantClient at main · oracle/docker-images ベースイメージはOraclelinux - Official Image | Docker Hubが使われている(結構でかい) Read more

GeoChart

Visualization: GeoChart | Charts | Google Developers FlutterアプリでGeoChartを使いたかったのだけれど、charts_flutterには含まれていない様子。 いずれにしてもSVGかVMLで出力されるので、それを返すWebAPIを作ってあげれば何とかなる? ドキュメント見た感じ、画像だけ取り出すのは難しそう?WebViewにするほ Read more

新規Flutterアプリ

以前(途中まで)作ったアプリを流用してみたものの、Flutterのバージョンが上がったせいかそのままだと警告がたくさん出る。 ほとんどはconstを追加する程度なので、問題はなさそう。 とりあえず、認証とFirestore登録までできた。