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: context,
builder: (_) {
return alert;
});
}
/* 숫자를 세자리 마다 콤마를 부여한 문자열로 반환 */
static String numberWithComma(int param){
return new NumberFormat('###,###,###,###').format(param).replaceAll(' ', '');
}

}

댓글

이 블로그의 인기 게시물

자바 string 비교 할때 equlas 를 사용하자

jqgrid 에서 export execl 붙이기

flutter webview scroll 안되는 경우 gestureRecognizers: gestureRecognizers, 추가 해서 되었다