일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- Sorted
- DART
- js
- FOR
- WECODE
- and
- map
- join
- decorator
- 위코드
- range
- sum
- STR
- Algorithm
- or
- MAX
- len
- iNT
- LOWER
- slice
- enumerate
- count
- SQL
- lambda
- Python
- index
- list
- If
- 파이썬
- split
- Today
- Total
목록나는 이렇게 학습한다/App (4)
코드로 우주평화
void main() { DateTime now = DateTime.now(); // 현재 날짜시간 print(now); // 2023-01-01 20:17:51.546 print(now.year); // 2023 //년, 월, 일, 시, 분, 초, 밀리 Duration duration = Duration(seconds: 60); // 기간을 나타냄 print(duration); // 0:01:00.000000 print(duration.inDays); // 0 print(duration.inHours); // 0 print(duration.inMinutes); // 1 print(duration.inSeconds); // 60 print(duration.inMilliseconds); // 60000 D..
main import 'package:flutter/material.dart'; import 'package:image_carousel/screen/home_screen.dart'; void main() { runApp( MaterialApp( home: HomeScreen(), ), ); } 설명은 생략 HomeScreen StatefulWidget class _HomeScreenState extends State { Timer? timer; PageController controller = PageController( initialPage: 0, ); State에 Timer 와 PageController 선언 initialPage는 인덱스니까 당연히 0 @override void initState()..
웹뷰를 구현했을 때, 막상 홈버튼이나 뒤로 가기 버튼이 없을 때가 있다. (혹은 위 이미지 처럼 엉뚱한 페이지로 빠지기도 한다) 이럴 때는 WebViewController를 이용해 해당 WebView 위젯을 컨트롤할 수 있다. WebViewController 사용법 해당 HomeScreen 클래스 안에 null이 올 수 있는 controller라는 공용 변수를 선언한다. class HomeScreen extends StatelessWidget { WebViewController? controller; ... WebView 위젯 파라미터에 onWebViewCreated를 추가한다 이때 받은 controller을 앞서 생성해두었던 공용 변수 this.controller 에 할당한다. class HomeScr..
webview_flutter 사용법 webview_flutter 는 웹페이지를 앱 형태로 보여주기위해, WebView 위젯을 제공하는 Flutter 플러그인이다. 설치방법 pubspec.yaml 파일의 dependencies 에 'webview_flutter: {버전}' 을 추가한다. Pub get 하는 거 잊지 말긔. dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 webview_flutter: ^3.0.0