12월, 2020의 게시물 표시

flutter 에서 이미지 넣어는데 반영이 안되는 경우 /정중앙에 타이틀

flutter 에서 이미지 넣어는데 반영이 안되는 경우 assets: - images/ - images/common/ 새로 고침 및 재기동 한다, AppBar headerNav({String title}) { return AppBar( title: new Text( '타이틀', textAlign: TextAlign.center, // style: new TextStyle(fontSize: 20.0, color: Colors.white), style: TextStyle(color: Colors.white, fontSize: 22, fontFamily: "NanumGothic", fontWeight: FontWeight.w700, ), ), centerTitle: true, // 정중앙에 타이틀 backgroundColor: Color(0xff324bca), leading: Padding( padding: const EdgeInsets.all(8.0), child: IconButton( icon: Image.asset( "images/common/menu_icon.png", color: Colors.white, ), onPressed: () {}, ), ), actions: [ IconButton( icon: Image.asset( "images/common/logo.png", color: Colors.white, ), onPressed: () {}, ), ], );

flutter comma intl

  import 'package:flutter/material.dart' ; import 'package:intl/intl.dart' show NumberFormat ; // 전역 변수 class Common { // static String localcontextUrl="http://192.168.0.8:8080"; static String contextUrl = "http://192.168.0.8:8080" ; // 일반적인 alert 창 제어 static void Alert (BuildContext context , String titles , String message) { var alert = new AlertDialog ( title: new Text (titles) , content: Container ( child: Row ( children: <Widget>[ Text (message)] , ) , ) , actions: <Widget>[ new FlatButton ( onPressed: () => Navigator. pop (context) , child: Text ( " 확인 " , style: TextStyle (color: Colors. black ) , )) ] , ) ; showDialog( context: con...

flutter json 처리

json data 처리 하는 클래스를  여러군데 선언 하고  import하는 경우 다른 이름으로 사용 하여야 한다. 기존의 return type을 사용 하는 경우도 생각을 해 볼 수 있다.  {     "easyInfo": {         "diff_amt": -1233280,         "with_cust": 0,         "tr_dt": "20201213",         "exp_amt": 1233280,         "amt": 1633000,         "exp_dt": "20201231",         "exp_sum": 21526436,         "hold_amt": 0     } } 클래스안에서 변수명이 일치 하면 error  발생 class Maps { EasyInfo easyInfo ; BizfundInfo bizfundInfo ; Maps({ this . easyInfo , this . bizfundInfo }) ; Maps. fromJson (Map<String , dynamic > json) { easyInfo = json[ 'easyInfo' ] != null ? new EasyInfo . fromJson (json[ 'easyInfo' ]) : null; bizfundInfo = json[ 'bizfundInfo' ] != null ? new BizfundInfo . fromJson (json[ 'bizfundInfo' ]) : null; } Map<St...
{     "message": "",     "flag": "",     "errorFlag": "",     "temp": "",     "temp1": "",     "temp2": "",     "count": "",     "map": {         "easyInfo": {             "exp_amt": 10000,             "exp_sum": 10000,             "amt": 10000,             "exp_dt": "20201215"         }     } }  class PostData { String message; String flag; String errorFlag; String temp; String temp1; String temp2; String count; Map map; PostData( { this .message, this .flag, this .errorFlag, this .temp, this .temp1, this .temp2, this .count, this .map}); PostData.fromJson( Map < String , dynamic > json) { message = json[ 'message' ]; flag = json[ 'flag' ]; ...