Open AsimAyman opened 2 years ago
React Native - Environment Setup
import {View} from 'react-native'
export default class App extends React.Componaent{
render(){
<View>
<Image>sourse ={require ("Image paht")}<Image>
</View>
}
}
5. we can create a const contains all styles and call it every time we need
const style = StyleSheet.create({ container: { flex: 1, backgroundColor: "#ffffff", }, title: { fontSize: 12, color: "#000", } })
Create facebook splash by React-native
![react png](https://user-images.githubusercontent.com/83433950/156324750-c665ca84-6e5b-43e7-a964-20d606709a80.png)
assets:
- images/facebooklogo.png
lib>>main.dart this is the start point of the project contains the Master Function main.
main() { runApp(myApp()); }
import 'package:flutter/material.dart';
11.Scaffold which is the Screen it Contains all screen attributes we need lie background color,so we can change the color using Colors enum For Standers colors and using Color() for rgb colors
class myApp extends StatelessWidget {
const myApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return
Scaffold(
backgroundColor: Colors.blue.,
body: Image.asset("assets/facebook.png"),
);
}
}
notes: . Every thing in flutter is a Widget.
Create facebook splash by native android code![Screenshot from 2022-03-02 10-24-28](https://user-images.githubusercontent.com/83433950/156324163-e3f5356f-030d-4bad-b185-ee8ed6f7c55b.png)
[React Native - Environment Setup]