[{"data":1,"prerenderedAt":571},["ShallowReactive",2],{"article-flutter-tips2":3},{"article":4,"tags":101,"previous":116,"next":537},{"id":5,"title":6,"author":7,"body":8,"createdAt":90,"description":91,"extension":92,"img":93,"meta":94,"navigation":95,"path":96,"seo":97,"stem":98,"tags":99,"updatedAt":90,"__hash__":100},"articles\u002Farticles\u002Fflutter-tips2.md","Flutter Tips 2","[object Object]",{"type":9,"value":10,"toc":88},"minimark",[11,15,84],[12,13,14],"p",{},"Tips and Tricks",[16,17,18,36,68,82],"ol",{},[19,20,21,22,25,30,32,33,35],"li",{},"Create application icons via online resource for Android and IOS platforms",[23,24],"br",{},[26,27],"img",{"alt":28,"src":29},"","\u002Farticles\u002Fimages\u002Fappicongenerator.png",[23,31],{},"android\u002Fapp\u002Fsrc\u002Fmain\u002Fres (copy all midmap)",[23,34],{},"ios\u002Frunner\u002Fassets.xcassets (copy all files to this xcassets from the download from appicongenerator tool)",[19,37,38,39],{},"How can I remove the Flutter debug banner?",[40,41,45],"pre",{"className":42,"code":43,"language":44,"meta":28,"style":28},"language-flutter shiki shiki-themes github-light github-dark","MaterialApp(\n  debugShowCheckedModeBanner: false,\n) \n","flutter",[46,47,48,56,62],"code",{"__ignoreMap":28},[49,50,53],"span",{"class":51,"line":52},"line",1,[49,54,55],{},"MaterialApp(\n",[49,57,59],{"class":51,"line":58},2,[49,60,61],{},"  debugShowCheckedModeBanner: false,\n",[49,63,65],{"class":51,"line":64},3,[49,66,67],{},")\n",[19,69,70,71],{},"Resources",[72,73,74],"ul",{},[19,75,76],{},[77,78,81],"a",{"href":79,"target":80},"https:\u002F\u002Fopenweathermap.org\u002F","_blank","OpenWeather",[19,83],{},[85,86,87],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":28,"searchDepth":58,"depth":58,"links":89},[],"2021-12-07","Series of tips and tricks related to Flutter mobile platform from Google","md","\u002Farticles\u002Fimages\u002Fflutter_small.png",{},true,"\u002Farticles\u002Fflutter-tips2",{"title":6,"description":91},"articles\u002Fflutter-tips2",[44],"Pu3cp_L2QtZXyVxsa0SJsYa1RZNP3Kc1PoNk_f_Oq2o",[102],{"id":103,"title":104,"body":105,"description":109,"extension":92,"img":110,"meta":111,"name":44,"navigation":95,"path":112,"seo":113,"stem":114,"__hash__":115},"tags\u002Ftags\u002Fflutter.md","Flutter",{"type":9,"value":106,"toc":107},[],{"title":28,"searchDepth":58,"depth":58,"links":108},[],"Flutter SDK is Google's UI toolkit for crafting beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Fflutter",{"description":109},"tags\u002Fflutter","9lY6efG0wl_9qbC_N3ABqlg6pCSWlTRgJqo_PHk8rUM",{"id":117,"title":118,"author":7,"body":119,"createdAt":528,"description":529,"extension":92,"img":93,"meta":530,"navigation":95,"path":531,"seo":532,"stem":533,"tags":534,"updatedAt":535,"__hash__":536},"articles\u002Farticles\u002Fflutter-update28.md","Flutter Change Android minSdkVersion After Update",{"type":9,"value":120,"toc":526},[121,124,132,135,142,148,154,160,170,469,475,521,524],[12,122,123],{},"When creating a flutter app the content of android\\app\\build.gradle is the following.",[40,125,130],{"className":126,"code":128,"language":129},[127],"language-text","defaultConfig {\n\u002F\u002F TODO: Specify your own unique Application ID (https:\u002F\u002Fdeveloper.android.com\u002Fstudio\u002Fbuild\u002Fapplication-id.html).  \napplicationId \"com.example.app_name\"  \nminSdkVersion flutter.minSdkVersion  \ntargetSdkVersion flutter.targetSdkVersion  \nversionCode flutterVersionCode.toInteger()  \nversionName flutterVersionName\n}  \n","text",[46,131,128],{"__ignoreMap":28},[12,133,134],{},"Where do these values come from?",[12,136,137,138,141],{},"flutter.minSdkVersion value is coming from your installed flutter SDK's flutter.gradle file which is located inside ",[46,139,140],{},"your_flutter_sdk\u002Fpackages\u002Fflutter_tools\u002Fgradle\u002Fflutter.gradle","\nRight now Jan 2023 it looks like...",[40,143,146],{"className":144,"code":145,"language":129},[127],"\u002F** Sets the compileSdkVersion used by default in Flutter app projects. *\u002F\nstatic int compileSdkVersion = 31\n\n\u002F** Sets the minSdkVersion used by default in Flutter app projects. *\u002F\nstatic int minSdkVersion = 16\n\n\u002F** Sets the targetSdkVersion used by default in Flutter app projects. *\u002F\nstatic int targetSdkVersion = 31\n\n\u002F**\n * Sets the ndkVersion used by default in Flutter app projects.\n * Chosen as default version of the AGP version below.\n *\u002F\nstatic String ndkVersion = \"21.1.6352462\"\n",[46,147,145],{"__ignoreMap":28},[12,149,150],{},[151,152,153],"strong",{},"Moving forward, how do we change these defaults?",[12,155,156,157,159],{},"With the 2.8 release where the minimum and target SDK versions is set\u002Festablished has changed within the Flutter project.",[23,158],{},"\nHow to change Android minSdkVersion in flutter project?  There are a couple approaches provided below.",[12,161,162,165,166,169],{},[151,163,164],{},"Approach 1."," You can change the minSdkVersion directly in the file Project_Name\u002Fandroid\u002Fapp\u002F",[151,167,168],{},"build.gradle"," , defaultconfig",[40,171,173],{"className":42,"code":172,"language":44,"meta":28,"style":28},"    defaultConfig {\n    \u002F\u002F TODO: Specify your own unique Application ID (https:\u002F\u002Fdeveloper.android.com\u002Fstudio\u002Fbuild\u002Fapplication-id.html).\n    applicationId \"com.example.projectname\"\n    minSdkVersion 16 \u002F\u002F \u003C--- There\n    targetSdkVersion 27\n    versionCode 1\n    versionName \"1.0\"\n    testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"}\n```\n\n\n\n**Approach 2.** The more appropriate way and maintainable approach is a little more involved however I would recommend.\n\nFor clarity, I will provide what the build.gradle looked like before and after the 2.8 update.\n\n```flutter\n    android {\n        compileSdkVersion 30\n    \n    defaultConfig {\n        applicationId \"com.example.app\"\n        minSdkVersion 21\n        targetSdkVersion 30\n        versionCode flutterVersionCode.toInteger()\n        versionName flutterVersionName\n        multiDexEnabled true\n    }        \n```\n\nAfter updating to Flutter 2.8:\n\n```flutter\n    android {\n        compileSdkVersion flutter.compileSdkVersion\n    \n    defaultConfig {\n            applicationId \"com.example.app\"\n            minSdkVersion flutter.minSdkVersion\n            targetSdkVersion flutter.targetSdkVersion\n            versionCode flutterVersionCode.toInteger()\n            versionName flutterVersionName\n        }\n``` \n\nSo here are the changes so that you can maintain the version(s) within your project.  \n\n**Update the android -> local.properties** adding the following 3 lines.  This will be where you set the min and target versions going forward.\n```flutter\nflutter.minSdkVersion=21\nflutter.targetSdkVersion=30\nflutter.compileSdkVersion=30\n",[46,174,175,180,185,190,196,202,208,214,220,226,232,237,242,248,253,259,264,270,276,282,288,293,299,305,311,317,323,329,335,340,345,351,356,361,366,372,377,382,388,394,400,406,412,418,424,429,435,440,446,451,457,463],{"__ignoreMap":28},[49,176,177],{"class":51,"line":52},[49,178,179],{},"    defaultConfig {\n",[49,181,182],{"class":51,"line":58},[49,183,184],{},"    \u002F\u002F TODO: Specify your own unique Application ID (https:\u002F\u002Fdeveloper.android.com\u002Fstudio\u002Fbuild\u002Fapplication-id.html).\n",[49,186,187],{"class":51,"line":64},[49,188,189],{},"    applicationId \"com.example.projectname\"\n",[49,191,193],{"class":51,"line":192},4,[49,194,195],{},"    minSdkVersion 16 \u002F\u002F \u003C--- There\n",[49,197,199],{"class":51,"line":198},5,[49,200,201],{},"    targetSdkVersion 27\n",[49,203,205],{"class":51,"line":204},6,[49,206,207],{},"    versionCode 1\n",[49,209,211],{"class":51,"line":210},7,[49,212,213],{},"    versionName \"1.0\"\n",[49,215,217],{"class":51,"line":216},8,[49,218,219],{},"    testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"}\n",[49,221,223],{"class":51,"line":222},9,[49,224,225],{},"```\n",[49,227,229],{"class":51,"line":228},10,[49,230,231],{"emptyLinePlaceholder":95},"\n",[49,233,235],{"class":51,"line":234},11,[49,236,231],{"emptyLinePlaceholder":95},[49,238,240],{"class":51,"line":239},12,[49,241,231],{"emptyLinePlaceholder":95},[49,243,245],{"class":51,"line":244},13,[49,246,247],{},"**Approach 2.** The more appropriate way and maintainable approach is a little more involved however I would recommend.\n",[49,249,251],{"class":51,"line":250},14,[49,252,231],{"emptyLinePlaceholder":95},[49,254,256],{"class":51,"line":255},15,[49,257,258],{},"For clarity, I will provide what the build.gradle looked like before and after the 2.8 update.\n",[49,260,262],{"class":51,"line":261},16,[49,263,231],{"emptyLinePlaceholder":95},[49,265,267],{"class":51,"line":266},17,[49,268,269],{},"```flutter\n",[49,271,273],{"class":51,"line":272},18,[49,274,275],{},"    android {\n",[49,277,279],{"class":51,"line":278},19,[49,280,281],{},"        compileSdkVersion 30\n",[49,283,285],{"class":51,"line":284},20,[49,286,287],{},"    \n",[49,289,291],{"class":51,"line":290},21,[49,292,179],{},[49,294,296],{"class":51,"line":295},22,[49,297,298],{},"        applicationId \"com.example.app\"\n",[49,300,302],{"class":51,"line":301},23,[49,303,304],{},"        minSdkVersion 21\n",[49,306,308],{"class":51,"line":307},24,[49,309,310],{},"        targetSdkVersion 30\n",[49,312,314],{"class":51,"line":313},25,[49,315,316],{},"        versionCode flutterVersionCode.toInteger()\n",[49,318,320],{"class":51,"line":319},26,[49,321,322],{},"        versionName flutterVersionName\n",[49,324,326],{"class":51,"line":325},27,[49,327,328],{},"        multiDexEnabled true\n",[49,330,332],{"class":51,"line":331},28,[49,333,334],{},"    }        \n",[49,336,338],{"class":51,"line":337},29,[49,339,225],{},[49,341,343],{"class":51,"line":342},30,[49,344,231],{"emptyLinePlaceholder":95},[49,346,348],{"class":51,"line":347},31,[49,349,350],{},"After updating to Flutter 2.8:\n",[49,352,354],{"class":51,"line":353},32,[49,355,231],{"emptyLinePlaceholder":95},[49,357,359],{"class":51,"line":358},33,[49,360,269],{},[49,362,364],{"class":51,"line":363},34,[49,365,275],{},[49,367,369],{"class":51,"line":368},35,[49,370,371],{},"        compileSdkVersion flutter.compileSdkVersion\n",[49,373,375],{"class":51,"line":374},36,[49,376,287],{},[49,378,380],{"class":51,"line":379},37,[49,381,179],{},[49,383,385],{"class":51,"line":384},38,[49,386,387],{},"            applicationId \"com.example.app\"\n",[49,389,391],{"class":51,"line":390},39,[49,392,393],{},"            minSdkVersion flutter.minSdkVersion\n",[49,395,397],{"class":51,"line":396},40,[49,398,399],{},"            targetSdkVersion flutter.targetSdkVersion\n",[49,401,403],{"class":51,"line":402},41,[49,404,405],{},"            versionCode flutterVersionCode.toInteger()\n",[49,407,409],{"class":51,"line":408},42,[49,410,411],{},"            versionName flutterVersionName\n",[49,413,415],{"class":51,"line":414},43,[49,416,417],{},"        }\n",[49,419,421],{"class":51,"line":420},44,[49,422,423],{},"``` \n",[49,425,427],{"class":51,"line":426},45,[49,428,231],{"emptyLinePlaceholder":95},[49,430,432],{"class":51,"line":431},46,[49,433,434],{},"So here are the changes so that you can maintain the version(s) within your project.  \n",[49,436,438],{"class":51,"line":437},47,[49,439,231],{"emptyLinePlaceholder":95},[49,441,443],{"class":51,"line":442},48,[49,444,445],{},"**Update the android -> local.properties** adding the following 3 lines.  This will be where you set the min and target versions going forward.\n",[49,447,449],{"class":51,"line":448},49,[49,450,269],{},[49,452,454],{"class":51,"line":453},50,[49,455,456],{},"flutter.minSdkVersion=21\n",[49,458,460],{"class":51,"line":459},51,[49,461,462],{},"flutter.targetSdkVersion=30\n",[49,464,466],{"class":51,"line":465},52,[49,467,468],{},"flutter.compileSdkVersion=30\n",[12,470,471,474],{},[151,472,473],{},"Add\u002Fmodify to the android\u002Fsrc\u002Fbuild.gradle"," file",[40,476,478],{"className":42,"code":477,"language":44,"meta":28,"style":28},"    android {\n        compileSdkVersion localProperties.getProperty('flutter.compileSdkVersion').toInteger()\n    ...\n    defaultConfig {\n        minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()\n        targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger()\n        versionCode flutterVersionCode.toInteger()\n        versionName flutterVersionName\n    }\n",[46,479,480,484,489,494,498,503,508,512,516],{"__ignoreMap":28},[49,481,482],{"class":51,"line":52},[49,483,275],{},[49,485,486],{"class":51,"line":58},[49,487,488],{},"        compileSdkVersion localProperties.getProperty('flutter.compileSdkVersion').toInteger()\n",[49,490,491],{"class":51,"line":64},[49,492,493],{},"    ...\n",[49,495,496],{"class":51,"line":192},[49,497,179],{},[49,499,500],{"class":51,"line":198},[49,501,502],{},"        minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()\n",[49,504,505],{"class":51,"line":204},[49,506,507],{},"        targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger()\n",[49,509,510],{"class":51,"line":210},[49,511,316],{},[49,513,514],{"class":51,"line":216},[49,515,322],{},[49,517,518],{"class":51,"line":222},[49,519,520],{},"    }\n",[12,522,523],{},"Keep in mind with this approach going forward you will maintain minimum and target SDK versions within the local.properties file.",[85,525,87],{},{"title":28,"searchDepth":58,"depth":58,"links":527},[],"2022-01-17","With the recent 2.8 release how and where the minSdkVersion is specified has changed.  It took a while to figure out, so I thought I would share this recent tip.",{},"\u002Farticles\u002Fflutter-update28",{"title":118,"description":529},"articles\u002Fflutter-update28",[44],"2023-01-01","yIViXfuP1XC3oBwA4eXSe_aiiqi3_lCpBvlr4ZC9lfM",{"id":538,"title":539,"author":7,"body":540,"createdAt":562,"description":563,"extension":92,"img":93,"meta":564,"navigation":95,"path":565,"seo":566,"stem":567,"tags":568,"updatedAt":562,"__hash__":570},"articles\u002Farticles\u002Fflutter-androidsdk.md","Android SDK Manage",{"type":9,"value":541,"toc":560},[542,549,552,557],[12,543,544,545],{},"If running Flutter Doctor and receiving ",[546,547,548],"em",{},"\"Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this.\"",[12,550,551],{},"Open up Android Studio - Tool SDK Manager - Android SDK and note also the SDK Tools tab where addition installs can be selected as well as \"Android SDK Command-line Tools\"",[12,553,554],{},[26,555],{"alt":28,"src":556},"\u002Farticles\u002Fimages\u002Fandroidstudio_android_commandlinetools.png",[12,558,559],{},"Note also here you can view your Android SDK Location: C:\\Users{username}\\AppData\\Local\\Android\\Sdk",{"title":28,"searchDepth":58,"depth":58,"links":561},[],"2021-12-06","Windows - Use Android Studio to manaage Android Studio Installation",{},"\u002Farticles\u002Fflutter-androidsdk",{"title":539,"description":563},"articles\u002Fflutter-androidsdk",[44,569],"android","lgLzSiWzrJuDfmQ3vNfpd-WnicLBZPSpOs_OpW4y22Y",1781574764322]