Mixins are a way of reusing a class’s code in multiple class hierarchies.
Get link
Facebook
X
Pinterest
Email
Other Apps
Comments
Popular posts from this blog
DART EXCEPTION HANDLING PARSING Change string value to double void main (){ String myString = 'abc' ; double myStringAsdouble = double. parse (myString) ; print(myStringAsdouble + 56 ) ; } Used example in a program how to use try and catch Catch takes the error and print in flutter terminal as written in code @override Widget build (BuildContext context) { String myString = "abc" ; double margin ; try { margin = double. parse (myString) ; } catch (e) { print(e) ; margin = 30 ; // use this or } return Scaffold ( body: Container ( margin: EdgeInsets . all (margin ?? 30 ) , // or use this color: Colors. grey , ) , ) ; } when margin takes value as 'abc' but it cant be converted into double so app return error message like below so we also give new margin value so that instead of that ('abc'), new value is used in a container DART NULL AWARE OPERATOR As above we use margin ??...
Building Platform Specific UI (android and iOS) lect(14 -6) First import dart: io create method in class for both platform and apply using(creating) a new method or using ternary operator Then Platform. isIOS and Platform. isAndroid
Comments
Post a Comment