This file contains 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
class User { | |
int id; | |
String name; | |
User({required this.id, required this.name}); | |
} | |
List<User> usersList = [ | |
User(id: 1, name: "John"), | |
User(id: 2, name: "Alex"), |
This file contains 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 { useState } from "react"; | |
import axios, { AxiosError, AxiosRequestConfig } from "axios"; | |
import React from "react"; | |
interface Props { | |
url: string; | |
method: "post" | "put" | "get" | "delete"; | |
body: AxiosRequestConfig<unknown> | undefined; | |
onSuccess: (data: unknown) => void; | |
} |
This file contains 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:audioplayers/audioplayers.dart'; | |
abstract class AudioService { | |
static AudioCache audioCache = AudioCache(); | |
static AudioPlayer audioPlayer = AudioPlayer( | |
playerId: 'my_unique_playerId', | |
mode: PlayerMode.LOW_LATENCY, | |
); | |
static void play(String filename) async { |
This file contains 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:samples/switch_button/switch_button.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
// This widget is the root of your application. | |
@override |
This file contains 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
class CandyCaneProgressBar extends StatelessWidget { | |
const CandyCaneProgressBar({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Stack( | |
children: <Widget>[ | |
Container( | |
width: MediaQuery.of(context).size.width, | |
height: 20, |
This file contains 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:samples/progress_bar/progress_bar.dart'; | |
import 'package:samples/withcher_chart/witcher_chart.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
// This widget is the root of your application. |