Question: Convert the react native code below to flutter code react native code here import React, { Component } from 'react'; import { StyleSheet,Text, View, Button

Convert the react native code below to flutter code

react native code here

import React, { Component } from 'react'; import { StyleSheet,Text, View, Button } from 'react-native'; class App extends Component{ constructor(){ super(); this.state={isLit:false} } toggleLight=()=>{ this.setState({isLit:!this.state.isLit}) } render() { const {isLit}=this.state; return (     ); } } class LightBulb extends Component{ renderText=()=> { if(this.props.isLit===false){ return"OFF"; } if(this.props.isLit===true){ return"ON"; } return ""; } render() { return (  {this.renderText()}  ); } } class LightButton extends Component{ constructor(){ super(); this.state={isLit:null} } componentDidMount(){ this.setState({isLit:this.props.isLit}) } renderText=()=> { if(this.state.isLit===false){ return "Turn light on"; } if(this.state.isLit===true){ return "Turn light off"; } return ""; } render () { return (  

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!