Flutter FutureBuilder Widget - API call using FutureBuilder | Flutter Tutorial Video Tutorial : https://youtu.be/2XCM878cZJc Source Code: import 'dart:convert' ; import 'package:flutter/material.dart' ; import 'package:http/http.dart' as http; void main () { runApp ( const MyApp ()); } class MyApp extends StatefulWidget { const MyApp ({ Key ? key }) : super ( key : key ); @ override State < MyApp > createState () => _MyAppState (); } class _MyAppState extends State < MyApp > { Future < int > getData () async { final data = await http. get ( Uri . parse ( "http://www.randomnumberapi.com/api/v1.0/random?min=100&max=1000&count=1" )); final body = json. decode (data.body); int number = (body as List ).first; return number; } @ override Widget build ( BuildContext context ) { return MaterialApp ( debugShowCheckedModeBanner : false , home :
Learn Some Basic Functions of Matplotlib Importing the packages: import matplotlib.pyplot as plt import numpy as np Plotting the points: x = np. array ([ 20 , 60 ]) y = np. array ([ 30 , 32 ]) print (x) plt. plot (x,y) Scatter Points: #plot 1 x = [ 1 , 2 , 3 , 4 , 5 ] y = [ 2 , 5 , 7 , 8 , 9 ] plt. scatter (x,y) #plot 2 x = [ 1 , 5 , 3 , 8 , 5 ] y = [ 2 , 3 , 7 , 6 , 9 ] plt. scatter (x,y) Bar Function: class1 = [ " a " , " b " , " c " , " d " ] x = [ 3 , 5 , 10 , 8 ] Pie Chart: values = [ 15 , 25 , 30 , 30 ] plt. pie (values)