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
/// Designed as a submission for Flutteristas Code Challenge 2023, the SnowflakeCanvas | |
/// is a simple Flutter app that creates a visual simulation of snowflakes | |
/// falling at different speeds. It uses a `CustomPainter` and a `Koch curve` | |
/// to draw snowflakes on a canvas, with each snowflake having a unique size and | |
/// falling speed. The snowflakes enter the screen smoothly from the top and reset | |
/// their position once they fall off the bottom, creating an endless snowfall effect. | |
/// This app uses basic animation techniques with `setState` and is designed to work | |
/// in environments with limited animation capabilities such as DartPad. | |
import 'dart: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 'dart:convert'; | |
import 'package:flutter/material.dart'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
import 'highscore.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} |
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 'dart:convert'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
class HighScore { | |
final String username; | |
final int difficulty; | |
final int score; | |
HighScore( |
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'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Flutter Demo', |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright 2014 Google, Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/main_scroll_view" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<LinearLayout | |
android:id="@+id/main_linear" |
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
package com.example.android.friendsquiz; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.res.Configuration; | |
import android.os.Build; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.text.TextUtils; | |
import android.util.Log; |
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
package com.example.android.friendsquiz; | |
import android.content.Intent; | |
import android.content.res.Configuration; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.text.TextUtils; | |
import android.util.Log; | |
import android.view.Gravity; | |
import android.view.View; |
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
package com.example.android.courtcounter; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.TextView; | |
public class MainActivity extends AppCompatActivity { | |
/** |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<ImageView | |
android:id="@+id/photo_image_view" | |
android:layout_width="match_parent" |
NewerOlder