Skip to content

Instantly share code, notes, and snippets.

View pratheeshrussell's full-sized avatar

Pratheesh pratheeshrussell

  • Enjoying life and coding
  • India
View GitHub Profile
@pratheeshrussell
pratheeshrussell / launch_background.xml
Last active March 1, 2020 18:05
native animated splash screen launch background file
<!-- android\app\src\main\res\drawable\launch_background.xml -->
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<item>
<bitmap
android:gravity="center"
android:src="@mipmap/ic_launcher" />
</item>
</layer-list>
@pratheeshrussell
pratheeshrussell / CustomSplashScreen.java
Last active March 2, 2020 09:14
native animated splash screen Splash Screen
//android\app\src\main\java\com\example\native_splash\CustomSplashScreen.java
//package name will differ based on projects
package com.example.native_splash;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import io.flutter.embedding.android.SplashScreen;
@pratheeshrussell
pratheeshrussell / CustomSplashScreenView.java
Last active March 2, 2020 09:08
native animated splash screen , the view file
//android\app\src\main\java\com\example\native_splash\CustomSplashScreenView.java
package com.example.native_splash;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Gravity;
@pratheeshrussell
pratheeshrussell / MainActivity.java
Created March 2, 2020 10:12
native animated splash screen , the main activity class
//android\app\src\main\java\com\example\native_splash\MainActivity.java
package com.example.native_splash;
import android.content.Context;
import android.util.Log;
import androidx.annotation.Nullable;
import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.android.SplashScreen;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.embedding.engine.dart.DartExecutor;
@pratheeshrussell
pratheeshrussell / extension.js
Created March 15, 2020 17:26
VS Code Extension- extension.js (version1)
const vscode = require('vscode');
/**
* @param {vscode.ExtensionContext} context
*/
//In case we need to create a terminal
let newTerminalId = 1;
//This function runs when the extension gets activated
{
"name": "flutter-commands",
"displayName": "Flutter Commands",
"description": "An Extension to run commonly used flutter commands",
"publisher": "PratheeshRussell",
"license": "MIT",
"version": "0.0.1",
"engines": {
"vscode": "^1.43.0"
},
@pratheeshrussell
pratheeshrussell / treeView.js
Created March 16, 2020 17:14
VS Code Extension- treeView.js
var vscode = require( 'vscode' );
//Tree display classes
class TreeCmd extends vscode.TreeItem {
constructor(type,label,collapsibleState,command)
{
super(label, collapsibleState);
this.type = type;
this.command = command;
}
}
@pratheeshrussell
pratheeshrussell / extension.js
Created March 16, 2020 17:24
VS Code Extension- extension.js (final)
const vscode = require('vscode');
var tree = require( './treeView.js' );
/**
* @param {vscode.ExtensionContext} context
*/
//In case we need to create a terminal
let newTerminalId = 1;
@pratheeshrussell
pratheeshrussell / package.json
Last active March 16, 2020 18:12
VS Code Extension- package.json (final)
{
"name": "flutter-commands",
"displayName": "Flutter Commands",
"description": "An extension to simplify flutter commands",
"publisher": "PratheeshRussell",
"icon": "resources/icon.png",
"license": "MIT",
"version": "0.0.1",
"repository": {
"type": "git",
@pratheeshrussell
pratheeshrussell / widget_app_test.dart
Last active May 30, 2020 15:17
testing my awesome app
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
// import our app
import 'package:test_app1/main.dart';
void main() {
testWidgets('testing my app', (WidgetTester tester) async {
String name = "Pikachu"; //Define the name to be passed
int noOfItemsTobeAdded = 3;
//Start our app