Flutter basic tutorial
- https://code.visualstudio.com/ - VS Code
- https://developer.android.com/studio - Android Studio
- https://github.com/git-for-windows/git/releases/download/v2.40.1.windows.1/Git-2.40.1-64-bit.exe - Git
- https://docs.flutter.dev/ - Dokumentacija
- https://docs.flutter.dev/get-started/install - Namestitev
- https://app.quicktype.io/ - generate Dart from JSON
- https://flutterflow.io/ - WYSIWYG Urejevalnik (plačljivo)
- https://firebase.google.com/ - Firebase, analitika, baza podatkov, prijava v aplikacijo,...
- https://onesignal.com/ - Potisna sporočila
- https://rxlabz.github.io/panache/#/ - Panache je orodje za urejanje gradnikov Flutter
- https://www.supernova.io/ - orodje za razvoj aplikacij Flutter
PS C:\Users\johnny\Desktop\DEV\xhorizont\flutter-basic\sample-1> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.10.0, on Microsoft Windows [Version 10.0.19042.1706], locale sl-SI)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.5)
X The current Visual Studio installation is incomplete. Please reinstall Visual Studio.
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.78.2)
[√] Connected device (3 available)
[√] Network resourcesflutter create --org com.myname my_app_nameMaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: const Text('Home'),
),
), );
/android/app/src/main/AndroidManifest. Xml
<manifestxmlns:android...><uses-permissionandroid:name="android.permission.INTERNET"/><application...</manifest>https://pub.dev/packages/flutter_inappwebview
$flutterpubaddflutter_inappwebviewali v pubspec.yaml
dependencies:
flutter_inappwebview: ^5.7.2+3Uporaba v kodi
import'package:flutter_inappwebview/flutter_inappwebview.dart';import'package:flutter/material.dart';import'mywebsite.dart';voidmain(){runApp(constMyApp());}classMyAppextendsStatelessWidget{constMyApp({super.key});
@overrideWidgetbuild(BuildContextcontext){returnMaterialApp(title: 'Test',theme: ThemeData(primarySwatch: Colors.blue,),home: constMyHomePage(),);}}classMyHomePageextendsStatelessWidget{constMyHomePage({Key? key}) : super(key: key);
@overrideWidgetbuild(BuildContextcontext){returnScaffold(appBar: AppBar(title: constText("Naša super aplikacija"),),body: Center(child: ElevatedButton(onPressed: (){Navigator.push(context,MaterialPageRoute(builder: (context)=>constMyWebsite()));},child: constText('Naprej'),),),);}}import'package:flutter/material.dart';import'package:flutter_inappwebview/flutter_inappwebview.dart';classMyWebsiteextendsStatefulWidget{constMyWebsite({Key? key}) : super(key: key);
@overrideState<MyWebsite>createState()=>_MyWebsiteState();}class_MyWebsiteStateextendsState<MyWebsite>{double _progress =0;lateInAppWebViewControllerinAppWebViewController;
@overrideWidgetbuild(BuildContextcontext){returnWillPopScope(onWillPop: ()async{varisLastPage=awaitinAppWebViewController.canGoBack();if(isLastPage){inAppWebViewController.goBack();returnfalse;}returntrue;},child: SafeArea(child: Scaffold(body: Stack(children: [InAppWebView(initialUrlRequest:
URLRequest(url: Uri.parse("https://telekom.si/")),onWebViewCreated: (InAppWebViewControllercontroller){
inAppWebViewController =controller;},onProgressChanged:
(InAppWebViewControllercontroller,intprogress){setState((){
_progress =progress/100;});},),_progress<1
? LinearProgressIndicator(value: _progress,)
: constSizedBox()],),),),);}}minSdkVersionflutter.minSdkVersionv
minSdkVersion17android/app/src/main/AndroidManifest.xml
// staro<applicationandroid:label="sampletwo"android:icon="@mipmap/ic_launcher">
// novo
<applicationandroid:label="Super App"android:icon="@mipmap/ic_launcher">