Skip to content

Instantly share code, notes, and snippets.

View vishweshsoni's full-sized avatar
💯
Live Learn Upgrade

vishwesh soni vishweshsoni

💯
Live Learn Upgrade
  • Bengaluru
View GitHub Profile
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@vishweshsoni
vishweshsoni / HeartScreen.dart
Last active February 8, 2020 12:57
HeartScreen.Dart
class HeartScreen extends StatefulWidget {
@override
_HeartScreenState createState() => _HeartScreenState()
}
class _HeartScreenState extends State<HeartScreen> {
bool isPressed = false;
static List<Color> _fill = <Color>[
Colors.grey[200],
Color(0xFFf8fbf8),
Widget concaveWithThumb(String txt) {
return Container(
width: MediaQuery.of(context).size.width / 4,
height: MediaQuery.of(context).size.height / 8,
child: Center(child: Icon(Icons.thumb_up)),
decoration: BoxDecoration(
color: Color(0xFFf8fbf8),
borderRadius: BorderRadius.all(Radius.circular(30)),
boxShadow: [
BoxShadow(
@vishweshsoni
vishweshsoni / concav.dart
Last active February 9, 2020 13:08
Concav
static List<Color> _fill = <Color>[
Colors.grey[200],
Color(0xFFf8fbf8),
Colors.white
];
Widget concav(String txt, Color _clr) {
return Container(
width: MediaQuery.of(context).size.width / 4,
height: MediaQuery.of(context).size.height / 8,
@vishweshsoni
vishweshsoni / covex.dart
Last active February 9, 2020 13:08
covex
//Creating convex effect
Widget convex(String txt) {
return Container(
width: MediaQuery.of(context).size.width / 4,
height: MediaQuery.of(context).size.height / 8,
child: Center(child: Icon(Icons.favorite_border)),
decoration: BoxDecoration(
color: Color(0xFFf8fbf8),
borderRadius: BorderRadius.all(Radius.circular(30)),
boxShadow: [
// void main() {
// // print(printInteger(10));
// var cc=log(44.2);
// print(cc.runtimeType);
// }
// printInteger(int number)
// {
// return number;
// }
// dynamic log(dynamic obj){
@vishweshsoni
vishweshsoni / main.dart
Created January 27, 2020 16:05
ResponsiveScreen
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Show up Demo',
theme: ThemeData(
@vishweshsoni
vishweshsoni / main.dart
Created January 27, 2020 12:35
Text-Animation in Flutter
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
@vishweshsoni
vishweshsoni / main.dart
Created January 27, 2020 12:31
Animate Text
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@vishweshsoni
vishweshsoni / sample.json
Last active January 9, 2020 08:35
Sample JSON
{
"id" : 1,
"name" : "vishwesh",
"languages" : [ "dart", "java", "js", "python", "c++"],
"mail" : "xyz@gmail.com",
"gender" : "male",
"about" : "SDE"
}