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 'dart:async'; | |
import 'dart:convert'; | |
import 'dart:developer'; | |
import 'package:web_socket_channel/web_socket_channel.dart'; | |
import 'message.dart'; | |
class WebSocketDisconnectInfo { | |
final int? code; | |
final String? reason; |
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 Fastify from "fastify"; | |
import WebSocket from "ws"; | |
import dotenv from "dotenv"; | |
import fastifyFormBody from "@fastify/formbody"; | |
import fastifyWs from "@fastify/websocket"; | |
import Twilio from "twilio"; | |
// Load environment variables from .env file | |
dotenv.config(); |
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:fl_chart/fl_chart.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
import 'package:wifi_shield/app/core/values/colors.dart'; | |
import 'package:wifi_shield/app/modules/speed_test/speed_test_controller.dart'; | |
class SpeedChart extends StatelessWidget { | |
const SpeedChart({super.key}); | |
SpeedTestController get speedTestController => |
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
<?php | |
class AuthController extends Controller | |
{ | |
// Logout | |
public function logout(Request $request): JsonResponse | |
{ | |
if (auth()->user()->tokens()->delete()) { | |
return response()->json(['message' => 'Logged out'], 201); |
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
// Create donut sections | |
List<DonutSection> donutSections = new ArrayList<>(); | |
donutSections.add(new DonutSection("Food", Color.parseColor("#6979F8"), 2f)); | |
donutSections.add(new DonutSection("Shopping", Color.parseColor("#FFCF5C"), 0.5f)); | |
donutSections.add(new DonutSection("Rent", Color.parseColor("#D48CF6"), 1f)); | |
donutSections.add(new DonutSection("Other", Color.parseColor("#FF98A8"), 0.5f)); | |
// Set data to donut chart | |
donutView.submitData(donutSections) |