This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:ionicons/ionicons.dart'; | |
import '../themes/constants.dart'; | |
class HeaderWidget extends StatelessWidget { | |
const HeaderWidget({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:universe_minimal_ui/model/planet_info.dart'; | |
import 'package:universe_minimal_ui/themes/constants.dart'; | |
class DetailsPage extends StatelessWidget { | |
final PlanetInfo planetInfo; | |
const DetailsPage({Key? key, required this.planetInfo}) : super(key: key); | |
@override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
Swiper( | |
itemCount: planetInfo.length, | |
itemWidth: MediaQuery.of(context).size.width, | |
itemHeight: MediaQuery.of(context).size.height, | |
layout: SwiperLayout.TINDER, | |
pagination: SwiperPagination( | |
builder: DotSwiperPaginationBuilder( | |
color: dotColor, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
..... | |
Positioned( | |
right: -64, | |
child: Hero( | |
tag: planetInfo.position, | |
child: Image.asset(planetInfo.iconImage) | |
) | |
), | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function homePage(){ | |
console.log('hello'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {Button} from 'react-native'; | |
import { useSharedValue } from 'react-native-reanimated'; | |
function App() { | |
const sharedValue = useSharedValue(0); | |
return ( | |
<Button | |
onPress={() => sharedValue.value += 1} | |
title="Press to count..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {Button,View} from 'react-native'; | |
import Animated, { useSharedValue, useAnimatedStyle } from 'react-native-reanimated'; | |
function App() { | |
const sharedValue = useSharedValue(0); | |
const boxStyle = useAnimatedStyle(() => { | |
return { | |
width: 100, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
TextInput, | |
TouchableOpacity, | |
View, | |
} from 'react-native'; | |
import Icon from 'react-native-vector-icons/Ionicons'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useSharedValue } from 'react-native-reanimated'; | |
... | |
const CustomTextInput = () => { | |
const InputLength = useSharedValue({width: '100%'}); | |
const SearchTextPlacement = useSharedValue({ | |
transformX: (Dimensions.get('window').width - 140) / 2, |