Home Blog Page 69

Best laptop for programming – Android studio requirements 2021

0
Best laptop for programming
best laptop for programming android development

Hi Guys, Welcome to Proto Coders Point, This Blog is about the best laptop for android development to run an android studio on a laptop smoothly.

So, you are planning to buy a new laptop for programming, if yes, then you are in right place, here we will share the best laptop for programming a guide to help you choose the best laptop specification for android studio.

When it comes to android studio development requirements you need to analyze laptop configuration carefully to run android studio smoothly before buying the laptop.
That’s because android studio & Emulator if runs at once it consume lots of RAM & processor load.

Laptop configuration for programming to run Android Studio smoothly

best laptop for android development or flutter development

Here are some specification need to been note before deciding which laptop is best for programming.

1. SSD Storage not HDD:-

I personally suggest you to buy a laptop which had SSD Storage as primary storage where you need to install your Operating System & Programming IDE (like android studio or any other) that will boost loading time of the IDE software, because as per my experience in running android studio on SSD drive is 10X times faster as compaired with HDD.

ssd

SSD Storage is very important & is been ignored by many people while buying new laptop for software development.

My Experience when i switched to SSD : When i used HDD with android studio installed, it took more then 10 minute to load it and even android Emulator used to load very slow almost 10-15 min but now a year back, i switched to SSD & boom now my system boot in just 1 min or less & android stdio loaded completely with build gradle file in just 2 minute or less.

For development with HTML & CSS i.e. web development 4 GB RAM is enought but when it comes to IDE such a android studio which need more RAM memory, 8 GB of RAM is Recommanded for Smooth run android in laptop

Note: if your laptop don’t have SSD then even increasing the RAM to 32 GB, is off no use: so better Buy a laptop that has SSD storage a primary memory.

3. Procesor i5:-

processor

If you are android developer choice a laptop with i5 4th generation or higher, because in low processor like i3, the IDE will run properly but sometime you may face issue such as android studio handing/lagging, build time is more, long time for build to generate apk, Emulator not working or Emulator not responding etc,

I recommended for low budget people, go with atleast i5 4th generation or higher, Best choice is i5 7th generation & higher.

4. Graphic Card:-

graphic card

As such Graphics Card is not that recommended for android development, but if you are a game developer then the graphic is required so better buy a laptop that a graphic card in it.

Graphic card is not required but in graphical view of UI xml design in android studio will boost the view a give a developer a high graphic feeling.

Recommended : Graphic car ( 2gb or higher) (not mandatory)

5 Top best laptop for programming – Android development 2021

1. Apple MacBook Air with Apple M1 Chip

The Apple laptop are best for productivity and apple laptop has longer battery life i.e. 18 hours. The Appe Macbook Air with M1 chip for a giant leap in CPU,GPU and machine learning performance, has upto 8 core CPU that boost performance. Upto to 8 GPU cores gives 5x faster graphics. 16 core Neural Engine that help machine learning developer speed up the execution.

Apple MacBook Air with M1 chip
BrandApple
Operating SystemMacOS 10.14 Mojave
Display13.3-inch(diagonal) LED backlit wiescreen display
ProcessorApple M1 Chip,8-core CPU
Storage256 GB or 512 GB SSD
RAM8GB
Apple Macbook Air Specification

Click here to learn more or buy Apple MacBook Air now


2. Lenovo Ideapad S145

Lenovo Ideapad s145
BrandLenovo
Operating SystemWindows 10
Display15.6 Inch
ProcessorIntel i5 10th generation
StorageHDD : 1 TB & SSD: 256GB
RAM8GB DDR4
Lenovo IdeaPad Specification

Click here to learn more or buy Lenovo IdeaPad S145 now


3. HP Pavilion Gaming  15-ec1052AX

HP Pavilion
BrandHP Pavilion
Operating SystemWindows 10
Display15.6 Inch
ProcessorAMD Ryzen 5 4600H
StorageHDD : 1 TB & SSD: 256GB
RAM8GB DDR4
Graphic CardNVIDIA GeForce GTX 1650, 4 GB
HP Pavilion Gaming Specification

Note: Always install Operating System & any of your Programming IDE(Eg: Android Studio) in SSD drive, so that the loading speed of OS and software will be 10x times faster.

Click here to learn more or buy HP Pavilion laptop now


4. Lenovo Legion 5

The Lenovo Legion 5 is very ultra-light and very slim and portable Gaming laptop, it’s a perfect gaming laptop for Game Lover, and best laptop for android development.

Lenovo legion 5
BrandLenovo, Legion 5
Operating SystemWindows 10
Display15.6 Inch, 1920 x 1080 (Full HD)
ProcessorAMD 4th generation Ryzen 5 4600H
StorageHDD : 1 TB & SSD: 256GB
RAM8GB DDR4
Graphic CardNVIDIA GeForce GTX 1650, 4 GB
Lenovo Legion 5 Specification

Click here to learn more or buy Lenovo Legion 5 now


5. Acer Predator Helios 300 PH315-53-72E9

acer predator helios 300
BrandAcer, Predator Helios 300
Operating SystemWindows 10
Display15.6 Inch, 1920 x 1080 (Full HD)
ProcessorIntel i7 10th Generation
StorageHDD : 1 TB & SSD: 256GB
RAM16GB DDR4
Graphic CardNVIDIA GeForce RTX 2060, 6 GB
Acer Predator Helios Specification

Click here to learn more or buy Acer Predator Helios 300 now


Recommended Post

Coding books for beginners

How to check your Flutter App size using dev tools

0
How to check your Flutter App size using dev tools
How to check your Flutter App size using dev tools

Hi Guys, Welcome to Proto Coders Point, In this article, we will learn about how to check/measure the app size of the flutter apps using dev tools.

Many App developers keep the focus on making their app size as less as possible, App size must be a concern. How much larger an app size, the more space it consumes on a device, if the app size is larger then a longer time is required to download and install on a mobile device.

Why flutter debug build app is large in size

When you use the flutter run or the press play button on your IDE(Android Studio or Visual Studio), it generates a debug build of the flutter app.
The app size of a debug build version is much large/big than the release build version because of debugging overhead that allows us to use flutter features such as hot reload & source-level debugging.
This debugged version of the app is not suitable to be distributed to end-user due to the app size big.

How to analysis app sizes of flutter built

With the Updates on Flutter version 1.22 and DevTools version 0.9.1, an app size analysis tool is been included that help flutter developer in measuring app size and remove unwanted or unused resources from flutter project.

Build apk or IOS file to analyze-size/measuring app size flutter

To invoke app size analysis took you need to pass –analyze-size flag while buildiing app file.

flutter build apk --analyze-size

This will give you “Cannot perform code size analysis when building for multiple ABIs. Specify one of android-arm, android-arm64, or android-x64 in the –target-platform flag“, because you need to pass ABIs

flutter build apk --analyze-size --target-platform android-arm64

different build command for targeted platforms

  • flutter build apk --analyze-size –target-platform *flag
  • flutter build appbundle --analyze-size –target-platform *flag
  • flutter build ios --analyze-size –target-platform *flag
  • flutter build linux --analyze-size –target-platform *flag
  • flutter build macos --analyze-size –target-platform *flag
  • flutter build windows --analyze-size –target-platform *flag

The above terminal command to build is different from standard release.

This build command display a summary describing the md app size in the terminal itself as shown in below screenshot.

flutter build apk --analyze-size

& create a json file by name code_size-analysis_*.json file which contain more detail analyze of app, you can analyze the app size in dev too by uploading the json file code_size-analysis_*.json.

Deeper analyze/measuring app size using devtools

However the summary related to app size in terminal is not a perfect details of app build, it can be just a quick idea of size of resources category such as assets, native code, external library used & much more.

So when you use above command to build app, it generate a json file that can be used in analysing deeper using dev tools.

Where JSON tree map can break down the content of app into individual file.

How to open Dev Tools in android studio.

Time needed: 2 minutes.

Steps to open Flutter Dev Tools in android Studio

  1. In IDE – Go to Terminal

    To Open Terminal in android Studio go to Toolbar > View > ToolWindows > Terminal
    or just press Alt + F12.

    terminal in android studio

  2. Command to open DevTools in android studio

    flutter pub global run devtools

    This will open devtools window/ Local website URL.
    lutter pub global run devtools

  3. Now upload the app size json file in dev tool

    now just upload the JSON file (C:\Users\PCName.flutter-devtools\apk-code-size-analysis_01.json) of the app that you want to analyze app size.

    flutter app analyze size dev tools

  4. Result of measuring app size


     dev tool detail measuring app size

Text animation in flutter – Animated Text Kit package library

0
text animation
text animation

Hi Guys, Welcome to Proto Coders Point, In this flutter tutorial we will implement text animation in flutter by using animated text kit flutter package/library.

Introduction to Flutter Animated_Text_Kit package

A Flutter package that contains lots of awesome & cool text animation effects in a flutter, This Animated text package contain animation properties like text rotate animation, fade in fade out animation, flutter animated typing text, scale animation effect, Colorize, TextLiquidFill, Wavy, and much more animation effect is been added in this flutter package.

Official Package site

So Let’s Begin Adding this Library in our flutter Project

Video Tutorial

Installation of Animated_Text_Kit package

  1. Create a new Flutter
    Of course, you need to create a new Flutter project or open an existing flutter project where you want to add text anim effect. In my case i am using android studio flutter to implement the same.

  2. Add Dependencies

    To add this library to your project just open pubspec.yaml file

and then under dependencies section add it

dependencies:
  animated_text_kit: ^4.1.0

3. Import the animated_text_kit.dart file

Now once you have added the dependencies now you can use the animated text package just by importing the dart file anywhere in your flutter app code.

import 'package:animated_text_kit/animated_text_kit.dart';

Syntax – How to use AnimatedTextKit in flutter

 AnimatedTextKit(
            animatedTexts: [
              TypewriterAnimatedText(
                'Hello world!',
                textStyle: const TextStyle(
                  fontSize: 32.0,
                  fontWeight: FontWeight.bold,
                ),
              ),
            ],
               totalRepeatCount: 4,
               pause: const Duration(milliseconds: 1000),
               displayFullTextOnTap: true,
               stopPauseOnTap: true,
          ),
Flutter animated typing text

Here in above snippet code, the text animation by default repeats for 3 times only, and with each loop of animation effect will pause for 1 second and repeat the anim again. if you want to repeat animation just add a property totalRepeatCount: #number as done in above snippet.

Customize the animation effect on text – Properties of this Library

  • pause – The time gap between the next animation texts effect.
  • displayFullTextOnTap – Then user tap on the animation text with will display the full text.
  • isRepeatingAnimation – controls whether the animation repeats
  • repeatForever – set to true if you want the animation to repeat forever until the user is on the screen.
  • totalRepeatCount – By Default repeat count is 3, to change it just set a repeat count number of times the animation should repeat (when repeatForever is false)

There are also custom callbacks:

  • onTap – Event to be performed then animation text is pressed.
  • onNext(int index, bool isLast) – This is called before the next text animation, after the previous one’s pause
  • onNextBeforePause(int index, bool isLast) – This is called before the next text animation, before the previous one’s pause
  • onFinished – This is called at the end, when the parameter isRepeatingAnimation is set to false

Combine multiple animation in one

AnimatedTextKit(
              animatedTexts: [
                FadeAnimatedText(
                  'Fade First',
                  textStyle: TextStyle(fontSize: 32.0, fontWeight: FontWeight.bold),
                ),
                ScaleAnimatedText(
                  'Then Scale',
                  textStyle: TextStyle(fontSize: 70.0),
                ),
              ],
              repeatForever: true,
       ),

Here in above snippet you see animatedTexts is a list widgets where we can pass more then one widget, it will work step by step means the first widget will run first then the next then the next and so on until the end.

Multiple Animation text in one

Other text animation effect in this flutter package

RotateAnimationText

Row(
  mainAxisSize: MainAxisSize.min,
  children: <Widget>[
    const SizedBox(width: 20.0, height: 100.0),
    const Text(
      'Be',
      style: TextStyle(fontSize: 43.0),
    ),
    const SizedBox(width: 20.0, height: 100.0),
    DefaultTextStyle(
      style: const TextStyle(
        fontSize: 40.0,
        fontFamily: 'Horizon',
      ),
      child: AnimatedTextKit(
        animatedTexts: [
          RotateAnimatedText('AWESOME'),
          RotateAnimatedText('OPTIMISTIC'),
          RotateAnimatedText('DIFFERENT'),
        ]
        onTap: () {
          print("Tap Event");
        },
      ),
    ),
  ],
);

FadeAnimatedText

Center(
        child: SizedBox(
          width: 250.0,
          child: DefaultTextStyle(
            style: const TextStyle(
              fontSize: 32.0,
              fontWeight: FontWeight.bold,
            ),
            child: AnimatedTextKit(
              animatedTexts: [
                FadeAnimatedText('Its'),
                FadeAnimatedText('Its Awesome...'),
                FadeAnimatedText('Its Awesome Animation'),
              ],
              onTap: () {
                print("Tap Event");
              },
            ),
          ),
        ),
      ),
fadeanimatedtext

TyperAnimationText

 Center(
        child: SizedBox(
          width: 250.0,
          child: DefaultTextStyle(
            style: const TextStyle(
              fontSize: 30.0,
              fontFamily: 'Bobbers',
            ),
            child: AnimatedTextKit(
                animatedTexts: [
                  TyperAnimatedText('A programming language is for thinking about programs, '
                      'not for expressing programs you’ve already thought of. '
                      'It should be a pencil, not a pen....'),

                ]

          ),
        ),
      ),
      ),

For more Animation Effect visit official package site here

Recommended Flutter Post

Flutter Animation – Custom Animation effect

Flutter Rich Text Widget Example

The reason why flutter app development is trending in 2021

1
Why Flutter App Development is trending
Why Flutter App Development is trending in 2021

Introduction to Flutter Application Development

A Flutter is a development framework/Kit, created by Google and its team. By using flutter as an app development kit you can develop applications for Android, iOS and Web that too from a single codebase (Code once and build installation setup for the various platforms).

Flutter Dart is an Object-Oriented Programming system concept (oops), which helps in the compilation of code to native code with no additional bridge. Thus it also helps in accelerating the start-up time of an application to a great extent.

Here are some points why flutter app development is trending in 2021

  • Flutter is based on a dart programming language which is the fastest object-oriented programming language and easy to learn.
  • It has a high-performance flutter rendering engine. They are pretty fast in loading widgets and customizable.
  • Due to awesome Widget speed in loading UI, Flutter provides you smooth and easy-to-use feel.
  • Same Business logic and UI design in all Platforms.
  • Flutter reduce code development time/ faster code development
  • The Flutter has its own rendering engine (Google’s Skia).
  • Flutter works almost on any platform.

Why Flutter Mobile App Development? – Pros of Flutter

Google-like company is a flutter backbone.

The main reason why flutter is trending rapidly in 2021 because flutter is been introduced by google, Google Flutter SDK that helps you in building a native application that works for mobile, Web, and also Desktop that too with the help of a single code

Customized Design & Impressive UI Design.

Flutter existing widgets can easily be customized & designed as per your Page UI Design. Flutter app developers can build super awesome app IU with less effort.

 Super Productive

As you know that Flutter comes with the best Feature that is Hot Reload Due to its stateFul development tools. Flutter allows for a very fast iterative coding style.

Perfect for Minimum Viable Product (MVP).

Flutter dart framework that supplies MVP plan that requires limited time such as the project costing will be mininum.

Save lots of time.

As Flutter is a cross platform development framework, code one and distrubute app in several platform, this will save lots of time compaired to native application development.

Flutter Hot reload

Hot Reload feature of Flutter a functionality for instantaneous updates on any change in UI or Dart code, Furthermore. the Hot reload option in flutter allows developer to test the UI loading quickly.

Ready to use the widget.

it has a number of “ready to use” widgets in which most of the widgets help in material design UI concepts.

Community Support & Documentation

The Flutter Community Support is bit small as commpared to react or Ionic application. But Flutter Support is growing very fast now a days.

What is the future scope of Flutter?

I guess that the future scope is to become a successful cross-platform environment flutter for building great mobile apps for iOS, Android.

however, the Flutter community is quite energetic and new packages are added every day to Dart Package and I expect the frequency to grow loads when Flutter 1.0 will be released in all likelihood inside the no longer too far destiny.

Pros of Flutter

Check out how to install flutter

If you are ubuntu user check how to install flutter in ubuntu

Android Studio bottom navigation bar android – custom navigation bar

0
custom bottom navigation bar android
custom bottom navigation bar android

Hi, Guys Welcome to Proto Coders Point, In this android studio tutorial article we will build a material component i.e custom bottom navigation bar android.

Bottom Navigation bar is a material component that help user to switch between screen or pages.

Here is how our final BottomNavigationView looks

BottomNavigationView bar
custom bottom navigation bar with fab button.

Video Tutorial on Custom Navigation Bar android

So now let’s begin Implementing the same.

Custom Bottom Navigation Bar android with Fab Button at center

Step 1: Create a new Android Project

Ofcourse you need to create a new Android Project or Open your existing Android Project where you want to add Bottom Navigation View.

In your Android Studio IDE go to, File > New > New Project ( a window will open select Empty Activity Next) > Give a name & package to your Android application & Finish (Android project will get created).

Step 2: Add Required Dependencies (build.gradle app level)

In your Android IDE Project section look for Gradle Script> build.gradle (app level) open it and add below 3 dependencies under the dependencies section if they don’t exist.

dependencies {     
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
    implementation 'com.google.android.material:material:1.3.0-alpha03'
}

Step 3: Add google maven repository and sync project

Then, you need to add android google maven url in your project repositories in build.gradle(project level) under allprojects section.

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

Step 4: Create 5 Vector Assets Icon in Drawable Folder

Then, you need 5 Vector Assets to show in each menu item of Bottom Navigation Bar. So to create it:

right click on drawable > New > Vector Assets ( a window will open select your clip Art as per your need Next ) > finish

create vector assets in android studio

Like this create 5 vector icon assets.

Step 5: Create menu in android studio

Then, you need to create a menu in android studio under

res > menu > (right click, create a new menu resource file) bottom_nav_menu.xml

and copy paste below xml code in it

bottom_nav_menu.xml

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:id="@+id/mHome"
        android:title="Home"
        android:icon="@drawable/ic_home_24"/>

    <item android:id="@+id/mSearch"
        android:title="Search"
        android:icon="@drawable/ic_search_24"/>
    <item android:id="@+id/mplaceholder"
        android:title=""
        />

    <item android:id="@+id/mPerson"
        android:title="Profile"
        android:icon="@drawable/ic_person_24"/>

    <item android:id="@+id/mSetting"
        android:title="Setting"
        android:icon="@drawable/ic_settings_24"/>


</menu>

Step 6: create 4 fragment files

then, to create frangment files under java folder right click on package name > New > Fragment > Fragment (Blank)

This will automatically create fragment xml file for you.

Have a look at my project structure, i have created 4 fragment class and 4 fragment xml.

Step 7: activity_main.xml custom bottom navigation bar android

custom bottom navigation bar android

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/framecontainer"
        >

        <androidx.coordinatorlayout.widget.CoordinatorLayout
            android:id="@+id/coordinator"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <com.google.android.material.bottomappbar.BottomAppBar
                android:id="@+id/bottomappbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom">

                <com.google.android.material.bottomnavigation.BottomNavigationView
                    android:id="@+id/bottomnavigationbar"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginRight="16dp"
                    android:background="@android:color/transparent"
                    app:menu="@menu/bottom_nav_menu" />

            </com.google.android.material.bottomappbar.BottomAppBar>

            <com.google.android.material.floatingactionbutton.FloatingActionButton
                android:id="@+id/fab"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_add_24"
                app:layout_anchor="@id/bottomappbar" />
        </androidx.coordinatorlayout.widget.CoordinatorLayout>
    </FrameLayout>


</RelativeLayout>

Step 8: Giving functionality to navigation menu bar

MainActivity.java

package com.example.customnavigationbar;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;

import android.os.Bundle;
import android.view.MenuItem;

import com.google.android.material.bottomnavigation.BottomNavigationView;

public class MainActivity extends AppCompatActivity {

    BottomNavigationView bottomNavigationView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        bottomNavigationView = (BottomNavigationView) findViewById(R.id.bottomnavigationbar);

        bottomNavigationView.setBackground(null);

        bottomNavigationView.getMenu().getItem(2).setEnabled(false);

        getSupportFragmentManager().beginTransaction().replace(R.id.framecontainer,new FragmentHome()).commit();

        bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
            @Override
            public boolean onNavigationItemSelected(@NonNull MenuItem item) {
                Fragment temp = null;

                switch (item.getItemId())
                {
                    case R.id.mHome : temp = new FragmentHome();
                                     break;
                    case R.id.mSearch : temp = new FragmentSearch();
                        break;

                    case R.id.mPerson : temp = new Fragment_Profile();
                    break;

                    case R.id.mSetting : temp = new FragmentSetting();


                }

                getSupportFragmentManager().beginTransaction().replace(R.id.framecontainer,temp).commit();
                return true;
            }
        });
    }
}

Flutter Drop Down Menu List – Drop Down In Flutter

0
drop down in flutter

Hi Guys, Welcome to Proto Coders Point, In this Flutter Tutorial we will learn How to implement drop down list in flutter.

A Dropdown in Flutter helps app user to select an item from a drop-down menu item. This widget will show the selected item on drop-down button and icon to indicate user it has a list of item to select.

A Flutter Drop Down Button is a generic type flutter widget which means you can pass any datatype as per your requirement, In flutter drop down menu list item string are been used most of the time.

Video Tutorial

Drop Down in flutter

How to implement a drop-down list in flutter?

Create a list of items to show them in Drop down spinner in flutter

Snippet Code

The Flutter DropDownButton contain several properties that you can use to create a customized dropdown list.

Here i above snippet code screenshot, i am using only 4 properties

  • value: A selected value from the drop-down will be shown in the drop-down button.
  • icon: to show a drop icon next to the button.
  • onChanged: when the user selects an option from the drop-down, the value on dropdownbutton changed.
  • items: where you need to pass your list of items that you want to show in DropDownMenuItem.

Then, I have used a map function that simply iterates to a list of items (items – Array list), so the map function in the first iteration will set item[0] to the drop-down, then in the second iteration, the second item will be set and so on up to the end of the array string.

Complete source code of Drop Down Button

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  String dropdownvalue = 'Apple';

  var items =  ['Apple','Banana','Grapes','Orange','watermelon','Pineapple'];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("DropDownList Example"),
      ),
      body: Container(
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              DropdownButton(
                value: dropdownvalue,

                  icon: Icon(Icons.keyboard_arrow_down),

                  items:items.map((String items) {
                       return DropdownMenuItem(
                           value: items,
                           child: Text(items)
                       );
                  }
                  ).toList(),

                onChanged: (String newValue){
                  setState(() {
                    dropdownvalue = newValue;
                  });
                },

              ),
            ],
          ),
        ),
      ),
    );
  }
}

Recommended Article

Flutter Web – Add Hover effect in flutter dropdown

flutter array array in flutter