<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Maksym Levytskyi on Medium]]></title>
        <description><![CDATA[Stories by Maksym Levytskyi on Medium]]></description>
        <link>https://medium.com/@m.levytskiy?source=rss-9844c8cdd10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*IJ8rpcapS7NgPsEk.</url>
            <title>Stories by Maksym Levytskyi on Medium</title>
            <link>https://medium.com/@m.levytskiy?source=rss-9844c8cdd10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 10:12:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@m.levytskiy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Flutter interview questions for 2025. Part 2]]></title>
            <link>https://medium.com/@m.levytskiy/flutter-interview-questions-for-2025-part-2-571cf78704a1?source=rss-9844c8cdd10------2</link>
            <guid isPermaLink="false">https://medium.com/p/571cf78704a1</guid>
            <category><![CDATA[flutterlifecycle]]></category>
            <category><![CDATA[flutter-interview]]></category>
            <category><![CDATA[flutter-isolate]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-async]]></category>
            <dc:creator><![CDATA[Maksym Levytskyi]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 17:51:29 GMT</pubDate>
            <atom:updated>2025-04-19T17:51:29.956Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VYJ_G5rQnDXDXty6vTZnRQ.png" /></figure><h3>1. What will the data type of variables a1 and a2 be?</h3><pre>main() {<br>  var a1 = 2;<br>  var a2;<br>  a2 = 2;<br>}</pre><p>The data <strong><em>a1</em></strong> is int (int — the type of a1 value)<br> The data type of <strong><em>a2</em></strong> is dynamic; (​​In Dart, if a variable is declared without an initial value and without specifying its type, it is automatically assigned the type ‘dynamic’.)</p><h3>2. What is a dynamic data type in Dart?</h3><p>In Dart, the dynamic data type is a special type that allows a variable to hold any type of value, such as string, integer, list, map, etc..</p><p>- If you use dynamic, you can get a <strong>runtime error</strong> in the place, whereas with a strict type declaration, you will get a compile-time error.</p><p>A place where you can use dynamic — it is the place where you don’t know the type at compile time. Better to avoid such places, but if you can’t — you have extra power with dynamics to handle it.<br>Example.</p><p>Imagine that in your company, developers decided making JSON Data fields with changeable types is good for the sake of conciseness.<br>Such Json could look like this:</p><pre>{<br>   &quot;items&quot;:[<br>      {<br>         &quot;type&quot;:&quot;message&quot;,<br>         &quot;content&quot;:{<br>            &quot;id&quot;:&quot;123&quot;,<br>            &quot;message&quot;:&quot;some message&quot;,<br>            &quot;time&quot;:23232323<br>         }<br>      },<br>      {<br>         &quot;type&quot;:&quot;vote&quot;,<br>         &quot;content&quot;:{<br>            &quot;id&quot;:&quot;124&quot;,<br>            &quot;option1&quot;:100,<br>            &quot;option2&quot;:0,<br>            &quot;Questiion&quot;:&quot;Is Putin huilo?&quot;,<br>            &quot;option1Text&quot;:&quot;Yes&quot;,<br>            &quot;option2Text&quot;:&quot;No&quot;<br>         }<br>      }<br>   ]<br>}</pre><p>Object in field “content” has a changeable type — it can be ‘message’ or ‘vote’ depending on the type field. And one of the solutions for working with field <strong><em>content</em></strong> in a class Item is making it dynamic.</p><h3>3. Is Dart a single-threaded or multithreaded programming language? What does it mean? Tell us more about asynchronous operations in Dart.</h3><p>Dart is a single-threaded programming language. This means that, by default, Dart executes code on a single thread, processing one operation at a time in a sequential manner. However, Dart has the ability to execute asynchronous code using an event loop, as well as multithreaded code using isolates. Isolates don’t work on all platforms. (They don’t work on the web)</p><p>It is quite confusing. For example, Kotlin and Java also work by default in a single thread, and we call them multithreaded languages. But for a job interview, it is enough, I think.</p><h3>4. How does an event loop work? Does each isolate have its event loop?<br>What is the higher priority for an event loop: a microtask or an event?</h3><p>Event loop is a mechanism in Dart that manages asynchronous operations(a sequence of operations split into 2 queues and processes them one by one). It consists of two queues:<br>- microtasks queue<br>- events queue<br>Each isolate has its own event loop. Microtasks — it is high-priority tasks, so they have a higher priority than usual events.</p><h3>5. What will the code result be?</h3><pre>void main() {<br>  Future&lt;void&gt;.delayed(const Duration(seconds: 1), () =&gt; _log(1));<br>  Future&lt;void&gt;.delayed(Duration.zero, () =&gt; _log(2));<br>  Future&lt;void&gt;(() =&gt; _log(3)).then((_) =&gt; _log(4));<br>  Future&lt;void&gt;.sync(() =&gt; _log(5));<br>  Future&lt;void&gt;.microtask(() =&gt; _log(6));<br>  _log(7);<br>  Future&lt;void&gt;(() =&gt; _log(8));<br>  Future&lt;void&gt;.delayed(const Duration(seconds: 1), () =&gt; _log(9));<br>}<br><br>void _log(int value) =&gt; print(value);</pre><p>You can check <a href="https://dartpad.dev/7984bb95e366bb5441fa4266bc19153f">here</a></p><h3>6. What will the code result be?</h3><pre>import &#39;dart:async&#39;;<br><br>Future&lt;void&gt; main() async {<br>  Future.delayed(Duration.zero).then((res) =&gt; print(0));<br>  print(1);<br>  <br>  Future(() =&gt; print(2));<br>  <br>  Timer(Duration(milliseconds: 1), () {print(3);});<br><br>  Future.microtask(() =&gt; print(4));<br>  print(await Future(() =&gt; 5));<br>}</pre><p>You can check <a href="https://dartpad.dev/5283a2490ef8fe10dc53922060b9931e">here</a></p><h3>7. How do isolates in Dart differ from threads in Java? And what are the advantages/disadvantages of each approach?</h3><ul><li><strong>Isolate in Dart</strong>:<br> Each isolate has its own isolated memory, and communication occurs through message passing.<br>pros:<br>✅ eliminates concurrent access issues;<br>cost:<br>❌ requires serialization for data exchange;<br>❌ Passing data between isolates adds complexity to the coding process</li><li><strong>Threads in Java</strong>:<br> Threads share memory and can exchange data directly through shared objects.<br>pros:<br>✅ fast data exchange through shared memory;<br>✅ concisely in code (requires less coding);<br>cost:<br>❌ risk of errors such as deadlocks and race conditions;</li></ul><h3>8. What is the life cycle of a StatefulWidget?</h3><blockquote>I wrote a short and concise answer below, so some details may be not clear, so you can read more <a href="https://medium.com/@eddd_11/stateful-widget-lifecycle-7970855a9f95">here(Stateful Widget lifecycle by Edgar Papikyan)</a></blockquote><p>- <strong><em>initState()</em></strong> — called after added current widget to widget tree;<br>- <strong><em>didChangeDependencies() </em></strong>— called after initState() and after changes in InheritedWidgets (like theme, locations, etc..)<br>- <strong><em>didUpdateWidget(oldWidget) </em></strong>— widget property updates (for example, parent rebuilt and started gave more spaces for the current widget)<br>- <strong><em>build()</em></strong> — called whenever the widget needs to rebuild<br>- <strong><em>deactivated()</em></strong> — called when the widget is temporarily removed from the widget tree;<br>- <strong><em>dispose()</em></strong> — called when the widget is fully removed from the widget tree;<br>- <strong><em>reassembled() </em></strong>— called when an application is reassembled during hot reload;</p><h3>9. Check the code below. What do you think about it?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TzhmW3yKVUq9QVl5Kl5fmA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UinXKsnWPu93SM7wIooVdg.png" /></figure><p>Answer:<br>ModalRoute under the hood uses a mechanism of InheritedWidgets, and getting data from it should be in a method <strong><em>didChangeDependencies().<br></em></strong>Otherwise, we get a runtime error. (We have context in method initState, but it is not ready for getting data from InheritedWidgets)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UU7eLKmX-YI-9-aOGT39Uw.png" /></figure><h3>10. Fix mistakes and make the code below better</h3><pre>import &#39;dart:async&#39;;<br>import &#39;package:flutter/material.dart&#39;;<br><br>class MyAnimatedWidget extends StatefulWidget {<br>  MyAnimatedWidget();<br><br>  State&lt;MyAnimatedWidget&gt; createState() =&gt; _MyAnimatedWidgetState();<br>}<br><br>class _MyAnimatedWidgetState extends State&lt;MyAnimatedWidget&gt;<br>    with TickerProviderStateMixin {<br>  late AnimationController _animationController;<br>  late TextEditingController _textInputController;<br>  late int _counter;<br><br>  Timer? _timer;<br><br>  @override<br>  void initState() {<br>    _animationController = AnimationController(<br>      vsync: this,<br>      duration: Duration(seconds: 3),<br>    )..repeat();<br><br>    _timer = Timer.periodic(Duration(seconds: 1), _timerCallback);<br><br>    super.initState();<br>  }<br><br>  void _timerCallback(_) {<br>    if (_timer!.isActive) return;<br><br>    setState(() {<br>      _counter++;<br>    });<br>  }<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return Scaffold(<br>      appBar: AppBar(title: Text(&quot;My Animated Widget&quot;)),<br>      body: Padding(<br>        padding: const EdgeInsets.only(left: 16, right: 16),<br>        child: Expanded(<br>          child: Column(<br>            children: [<br>              Opacity(<br>                opacity: _animationController.value,<br>                child: Container(width: 100, height: 100),<br>              ),<br>              SizedBox(height: 20),<br>              Text(&#39;count: $_counter&#39;),<br>              SizedBox(height: 20),<br>              TextField(<br>                controller: _textInputController,<br>                decoration: InputDecoration(labelText: &quot;enter number&quot;),<br>              ),<br>              SizedBox(height: 20),<br>              ElevatedButton(<br>                onPressed: () {<br>                  _animationController.stop();<br>                },<br>                child: Text(&quot;stop animation&quot;),<br>              ),<br>            ],<br>          ),<br>        ),<br>      ),<br>    );<br>  }<br><br>  @override<br>  void dispose() {<br>    super.dispose();<br>    _animationController.dispose();<br>  }<br>}</pre><p>answer will be in the next part</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=571cf78704a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I fixed an unexpected bug in my pet project]]></title>
            <link>https://medium.com/@m.levytskiy/how-i-fixed-an-unexpected-bug-in-my-pet-project-4f36bb0e3791?source=rss-9844c8cdd10------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f36bb0e3791</guid>
            <category><![CDATA[flutter-hero-animation]]></category>
            <category><![CDATA[flutter-animation]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter-ui]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Maksym Levytskyi]]></dc:creator>
            <pubDate>Wed, 16 Apr 2025 16:44:57 GMT</pubDate>
            <atom:updated>2025-04-16T16:44:57.316Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*iXVqqTuzSIZNUub3PjNk7w.gif" /><figcaption>image for preview</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*oK0d1Y90g5YcXOa1dnpJFw.gif" /></figure><h3>1. What is the problem?</h3><p>In my app, I use hero animation when switch 2 screens (the first screen starts loading data from assets for the second screen and shows hero animation from the bottom of the first screen to the center of the loading screen. After that, I show animation from the center of the loading screen to the correct position on top of the second screen)</p><p>This bug in the hero animation happens when we are doing animation from the loading screen to the second screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XYAEZj10nhMtFVRMkI0vJg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NcZLsjBgE5FD2g2y8mh8Aw.png" /></figure><h3>2. Why does it happen?</h3><p>As you can see, the image(on top of the screen) was not ready when the hero object moved to the second screen. The image height is wrap_content, and the finished place for hero animation depends on that size. So, probably the starting place for animation is computed depending on the finish place, and it’s not independent. <br>Based on this logic, I decided to preload that image by using the ‘precacheImage’ function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C7GqB7bdnGAISItkZyo36A.png" /></figure><p>This solution works well, as you can see below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*KPElOnVUz9R0-pgPbLQ7sQ.gif" /></figure><h3>3. Let’s use ‘precacheImage’ in projects :)</h3><p>The method doesn’t just boost performance and prevent extra loading behaviour in the application, but also sometimes fixes bugs.</p><p>If you want to read code and investigate by themself, I added the link to the project below (check the file quiz_land_question_screen.dart)</p><p><a href="https://github.com/mlevytskiy/quizland_calculator/blob/master/library/core/lib/src/screen/screen2_quiz_land_question/widget/quiz_land_question_screen.dart">https://github.com/mlevytskiy/quizland_calculator/blob/master/library/core/lib/src/screen/screen2_quiz_land_question/widget/quiz_land_question_screen.dart</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f36bb0e3791" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter interview questions for 2025. Part 1]]></title>
            <link>https://medium.com/@m.levytskiy/flutter-interview-questions-for-2025-part-1-16260ede2b49?source=rss-9844c8cdd10------2</link>
            <guid isPermaLink="false">https://medium.com/p/16260ede2b49</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[programming-interviews]]></category>
            <category><![CDATA[tech-career]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[mobile-development]]></category>
            <dc:creator><![CDATA[Maksym Levytskyi]]></dc:creator>
            <pubDate>Tue, 15 Apr 2025 14:57:21 GMT</pubDate>
            <atom:updated>2025-10-14T13:37:09.674Z</atom:updated>
            <content:encoded><![CDATA[<p>These are notes from a technical interview for a Flutter Developer position. I hope they help you prepare for a Flutter Developer interview</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QoU2yNCCMxsTDJnT1UGexg.png" /></figure><blockquote>- Why did you leave your previous job?<br>- …</blockquote><h3>0. Questions about your work experience</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*_VaGYYJdZ72ti058yrXvsQ.jpeg" /></figure><p>What did you do at your last job? What was your role? What was the process on the project? How did you estimate the task? (in terms of how much effort and time it would take) Did you break the task down into epics and then estimate it? Was it so that after the task evaluation, you took up the task and realized that it would take more time and effort than the estimate given by the team? How did you get out of this situation?</p><h3>1. What OOP principles do you know? What language structures do we have in Dart to implement them?</h3><p>I know 4 OOP principles: encapsulation, inheritance, polymorphism, and abstraction.</p><p>Encapsulation is the ability to hide anything we don’t need to know to use an object correctly.<br>To implement it in Dart, we have:<br>• underscore in naming function to make them private<br>• geter/setter<br>• export with hide/show and class modifier base to implement encapsulation on library level<br>• modifier const (empower encapsulation, because const objects deeply immutable)</p><p>Polymorphism is the different behaviour of objects with a common interface.</p><p>To implement it in Dart, we have:<br>• method overriding (method overloading forbidden)<br>• interface implementation</p><p>Inheritance is reusing class code in another class without copy-paste.<br>To implement in Dart, we have:<br>• keyword ‘extends’ (only single inheritance)<br>• mixin-based inheritance (multiple inheritances)</p><p>Abstraction is focusing on key object characteristics.<br>To implement in Dart, we have:<br>• Abstract class, interface</p><h3>2. What can you say about the base class modifier?</h3><ul><li>The base modifier prevents class inheritance outside the library, protecting its structure from modifications.</li><li>the base class constructor is always called in any subtype (calls super doesn’t necessary)</li><li>All private fields exist and are visible in subtypes</li><li>All classes that extend base must be marked as base, final, or sealed</li></ul><h3>3. Tell us about all class modifiers found in the code below</h3><figure><img alt="https://dartpad.dev/9b1fa7851aefc5dd1a1f989fa9c8e2c6" src="https://cdn-images-1.medium.com/max/1024/1*5i-JVyPaxdnifGV6DUtdiQ.png" /></figure><p><a href="https://dartpad.dev/9b1fa7851aefc5dd1a1f989fa9c8e2c6">https://dartpad.dev/9b1fa7851aefc5dd1a1f989fa9c8e2c6</a></p><p>• <strong>abstract class</strong> — class can’t be constructed; can be extended or implemented<br>• <strong>abstract final class </strong>— can’t be constructed; it can be extended or implemented, but its subtype should be final, sealed, or base<br>• <strong>sealed class</strong> — a class that knows about his subtypes (so it can be used in switch like enum)<br>• <strong>base class </strong>— prevents class inheritance outside the library<br>• <strong>final class </strong>— can be constructed; his subtypes should be final, base, or sealed<br>• <strong>annotation immutable</strong> — provides warning if the class is mutable</p><h3>4. Tell me more about mixins. How can I use mixins, and what for?</h3><p>Mixin in Dart is a way to add behavior to a class without inheritance. It solves the problem of multiple inheritances. Mixins can be added to a class without paying attention to whether the class inherits someone or not. You can add several mixins to one class. The mixin keyword is used to create a mixin, and the class that uses the mixin code uses the with keyword. In a mixin it is possible to create a boundary so that it applies to classes of a certain type. This is achieved by using the keyword ‘on’.</p><h3>5. Will the code below compile? What is the result of executing this code?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8sdCFRj6Be8ACQugTLfpFg.png" /></figure><p><a href="https://dartpad.dev/040a7dc4844f72d24b2ab1577e13928d">https://dartpad.dev/040a7dc4844f72d24b2ab1577e13928d</a></p><p>When we see several mixins that override the same method, mixin under the hood use inheritance to implement the functional, and it wth start inheritance from last mixin;</p><p>So it will be (pseudocode):</p><p>class SomeFeatureBlocImpl extends SomeFeatureBlocMixin2 { }<br>class SomeFeatureBlocMixin2 extends SomeFeatureBlocMixin1 { }<br>class SomeFeatureBlocMixin1 extends SomeFeatureBaseBloc { }</p><p>Results will be at the end of this article (;</p><h3>6. Can mixin contain an abstraction in its code? An abstract method or a field?</h3><p>Yes, it can, either an abstract method or an abstract field. In this case, those classes that inherit the mixin must implement this abstraction</p><h3>7. How does const field differ from final field?</h3><p>const:<br>• created at compile time<br>• initialization occurs at declaration<br>• creates deeply immutable objects (e.g. values in a list created as final can be changed, but those created with the const modifier cannot)</p><p>final:<br>• created in runtime<br>• initialization occurs at object creation<br>• final object can be modifiable (e.g. new instances can be added to a list created as final)</p><h3>8. If I use const applied to class instances in 2 different places. Will it create 2 different objects or one?</h3><p>It will create one object for both places. This is due to the canonicalization mechanism that applies to const objects. Canonicalization works as follows: before creating an instance of an object, Dart checks whether an identical object already exists and, if it does, reuses it. This works for classes that have a const constructor, and all their fields must be const or final.</p><p>Check yourself with 2 code examples (What do they prints in the console?):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tcXq5UofRWEUEmz9mVtdMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1zdCvOT7WKIfcRlrcGw_ug.png" /></figure><p><a href="https://dartpad.dev/1b63db37fe245a85f46fa01df77116e7">https://dartpad.dev/1b63db37fe245a85f46fa01df77116e7</a></p><p>Results will be at the end of this article (;</p><h3>9. What the difference between const collections and final ones. const arrayList vs final arrayList what is the difference?</h3><p>A collection created with the const modifier is completely immutable.</p><p>Check yourself with the next code: (What does it print in the console?)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*7ce_TRTIIrczTP634nza9g.png" /></figure><p><a href="https://dartpad.dev/47fdbf14f228f117b204dd560a074f05">https://dartpad.dev/47fdbf14f228f117b204dd560a074f05</a></p><p>Results will be at the end of this article (;</p><h3>10. Tell me about variable scope in Dart</h3><p>In Dart, variable scope determines where variables are accessible:</p><p>We can use an underscore to control variable scope and the place where this variable was written:<br>For example, int _number = 1 out of class will be library private variable; inside class — will be class private variable. Also, we have modifier ‘static’ to make the variable independent of class instance, and it makes the variable accessed via the class.</p><h3>Results for code questions:</h3><p>Question number 5 code prints:<br>dispose SomeFeatureBlocImpl<br>dispose SomeFeatureBlocMixin2<br>dispose SomeFeatureBlocMixin1</p><p>Question number 8:<br>code 1 prints:<br>true<br>false<br>true<br>false</p><p>code 2 prints:<br>true<br>false<br>true<br>false<br>true</p><p>Question number 9 code prints:<br>[1, 2, 3]<br>[1, 2, 3, 4]</p><h3>Check how well you know these 10 questions:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*KfRgmSBbJr_zX7dAzmOp1Q.gif" /></figure><p><a href="https://mlevytskiy.github.io/flutter_interview_memory_cards/">https://mlevytskiy.github.io/flutter_interview_memory_cards/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16260ede2b49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to make custom snippets in Android studio]]></title>
            <link>https://medium.com/@m.levytskiy/how-to-make-custom-snippets-in-android-studio-92c620340d6a?source=rss-9844c8cdd10------2</link>
            <guid isPermaLink="false">https://medium.com/p/92c620340d6a</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android-studio]]></category>
            <category><![CDATA[snippet]]></category>
            <dc:creator><![CDATA[Maksym Levytskyi]]></dc:creator>
            <pubDate>Sun, 29 Jan 2023 12:40:47 GMT</pubDate>
            <atom:updated>2023-01-29T12:40:47.811Z</atom:updated>
            <content:encoded><![CDATA[<p>I decided to figure out flutter riverpod today, and found that person in <a href="https://www.youtube.com/watch?v=vtGCteFYs4M">this</a> video uses special snippets in android studio. It looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5j2-Gj6y6DPQxYaDc5_Idg.png" /></figure><p>I’m going to show in this small article how to create the same snippets in Android studio</p><ol><li>go to “Android Studio -&gt; Preferences”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GzTOkouQ4g2xB4GxlCYUtg.png" /></figure><p>2. enter ‘snippets’ and open ‘Live templates’<br>(I had folder ‘flutter riverpod snippets’ because I’ve installed plugin with the same name(flutter riverpod snipped), but I didn’t find snippet what I wanted there. You can use flutter folder if you don’t want install that plugin, It doesn’t matter, the steps of creating new snippets will be the same)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wzb-eKXRg1rC0oBmTZhz2A.png" /></figure><p>3. choose a folder and press plus-&gt;live template</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eIeTiy4WIB9-8iI6f9N5NA.png" /></figure><p>4. go to riverpod docs to get content for our snippet and copy code.<br><a href="https://riverpod.dev/docs/getting_started">https://riverpod.dev/docs/getting_started</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kMqDSoqlYYJvbVIAnIEYpA.png" /></figure><p>5. paste the code in ‘template text ’and fill ‘abbreviation’ and ‘description ‘ fields</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NGnScrKEJof78_whVB1Fdg.png" /></figure><p>6. define context where we going to use snippet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LtacAcIzpNdn9zNAVrbmIw.png" /></figure><p>the end)<br>We can use our snippets in main.dart like person on the video in the start of article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1C7UnAgc8pc9VdsvV7QFNg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92c620340d6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>