웹 and 앱 프로그래밍
-
[Flutter]Scaffold웹 and 앱 프로그래밍/Flutter 2022. 12. 24. 21:31
Scaffold 의기본 구성 EX) Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Sample Code'), ), body: Center( child: Text('You have pressed the button $_count times.'), ), bottomNavigationBar: BottomAppBar( child: Container( height: 50.0, ), ), floatingActionButton: FloatingActionButton( onPressed: () => setState(() { _count++; }), tooltip: 'Increment Counter', child: Ic..
-
[Flutter]Future Await Async웹 and 앱 프로그래밍/Flutter 2022. 12. 24. 20:42
Flutter에서 비동기 프로그램을 짜기 위해서는 비동기 함수를 표시해 주는 Async 그리고 비동기 사용 위한 Await, 지금은 없지만 미래에 (값을) 받게 해주는 Future가 존재한다. EX) Future postReply(VALUE) async { Map ask={'VALUE':VALUE}; final uri = Uri.https('example.com', 'api/fetch'/*,만약 get 사용시 파라미터지정가능{'limit': '10'}*/); final response = await http.post( uri, headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: ask , ); } 또한 이값을 나중에 받고 나중에 사..
-
[Flutter]URI함수웹 and 앱 프로그래밍/Flutter 2022. 12. 24. 15:40
함수 뜻을 자세히 모르고 구글링하며 사용하다 꽤나 애 좀 먹었다....; Uri.https('호스트&포트','경로','쿼리파라미터값(GET요청시)') return => 완성된 Uri 타입의 URL완성 Uri.parse('스트링형식의 URL') return => URL을 분리해서 Uri타입으로 반환해준다 ex) final uri = Uri.parse( 'https://dart.dev/guides/libraries/library-tour#utility-classes'); print(uri); // https://dart.dev print(uri.isScheme('https')); // true print(uri.origin); // https://dart.dev print(uri.host); // dart...
-
URI란?웹 and 앱 프로그래밍 2022. 12. 24. 15:10
URI 약칭 Uniform Resource Identifier 다시말해 웹서버에서 리소스를 식별하기위한 것이다. URL는 URL,URN이 있는데 주로우리에게는 전자가 익숙할것이다(실제로도 URL을 더많이 사용한다). URL :리소스의 특정 위치 를 구체적인 서술을 요함 URN :리소스가 어디있던간에 찾을수있는 방식 URL은 스킴에따라 문법이 다르며 기본적으로 아래 문법을 사용한다. ://:@:/?# 스킴(scheme):어떤 프로토콜로 서버에 접속할것인지 서술을 요함 사용자 이름: 가끔씩 서버에서 접근이 허용된 사용자의 비번을 요구 할때가 있다. (EX:ftp) 호스트,포트: 해당 서버의 IP(OR 도메인명) and PORT를 적는곳 앞서말한 사용자이름이없으면 @생략가능 (포트생략시 기본으로 80사용) 경..