Skip to content

Instantly share code, notes, and snippets.

View NonymousMorlock's full-sized avatar
🏠
Working from home

NonymousMorlock

🏠
Working from home
View GitHub Profile
@NonymousMorlock
NonymousMorlock / Flutter ResponsiveDatatableSample.dart
Created May 12, 2023 18:26 — forked from naywin-programmer/Flutter ResponsiveDatatableSample.dart
To Create Responsive Datatable With Flutter Built-in Datatable
// Flutter Responsive Datatable
// Flutter Datatable Class: https://api.flutter.dev/flutter/material/DataTable-class.html
// Flutter code sample for DataTable
// This sample shows how to display a [DataTable] with three columns: name, age, and
// role. The columns are defined by three [DataColumn] objects. The table
// contains three rows of data for three example users, the data for which
// is defined by three [DataRow] objects.
//
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
class Event {
const Event({
required this.id,
required this.creatorId,
required this.attendeeIds,
});
@NonymousMorlock
NonymousMorlock / main.dart
Created August 17, 2023 14:31 — forked from Piinks/main.dart
Two Dimensional Grid in Flutter
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
package com.gdsc.layout_tutorial
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
@NonymousMorlock
NonymousMorlock / dart_assignment.1.py
Last active November 17, 2023 12:44
Convert these to dart
# remember, in dart, when a function doesn't return anything, then it's type is void
def greeting(name):
print(f'Hello {name}!!!')
def sum(first_number, second_number):
return first_number + second_number
def difference(n1, n2):
print(f'The difference between {n1} & {n2} is {n1 - n2}')
@NonymousMorlock
NonymousMorlock / solution.dart
Created November 17, 2023 12:49
Solution to the conversion
void greeting(String name) {
print('Hello $name!!!');
}
int sum(int firstNumber, int secondNumber) {
return firstNumber + secondNumber;
}
void difference(int n1, int n2) {
print('The difference between $n1 & $n2 is ${n1 - n2}');
void main() {
// number 1
// number 2
// sum
// The type of the data
// video
// image
// app
// character
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override