Skip to content

Instantly share code, notes, and snippets.

@Inheritancersa
Inheritancersa / main.dart
Created February 25, 2026 14:27
Splash Screen Flutter
import 'package:flutter/material.dart';
import 'package:flutter_application_2/splash.dart';
import 'dart:io';
import 'package:image_picker/image_picker.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@Inheritancersa
Inheritancersa / HelloWorld
Created November 19, 2025 11:09
My first successful Flutter Application! A simple calculator app
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Simple calculator app by Lefa Lipali';
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
@Inheritancersa
Inheritancersa / main.dart
Created March 24, 2025 09:51
TPG216C Exercise 2
/*Circle Area: Declare a constant variable for pi (3.14159). Ask the user for the
radius of a circle. Calculate the area of the circle using the formula area = pi *
radius * radius. Use string interpolation to print the result in the format "The area
of the circle is [area]"*/
import 'dart:io';
void main() {
const double pi = 3.14159;
double? radius;
@Inheritancersa
Inheritancersa / main.dart
Created March 24, 2025 08:27
TPG216C Exercise 1
/*Greetings: Ask the user for their first and last names. Store these in
variables. Then, use string interpolation to create a greeting message like
"Hello, [FirstName] [LastName]!". Print the message. */
import 'dart:io';
void main() {
//First we promt and read then store the inputs
stdout.write("Please enter your first name: ");
String firstName = stdin.readLineSync() ?? "";