Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing on Flutter

Muhammed Mukhthar CM mukhtharcm

🎯
Focusing on Flutter
View GitHub Profile
@mukhtharcm
mukhtharcm / not_model.g.dart
Created Mar 16, 2021
TypeAdaptor Example for blog
View not_model.g.dart
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'note_model.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class NoteModelAdapter extends TypeAdapter<NoteModel> {
@override
@mukhtharcm
mukhtharcm / ternary-operator-flutter.dart
Last active Mar 15, 2021
Example for using ternary operator in Flutter.
View ternary-operator-flutter.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@mukhtharcm
mukhtharcm / post_list.dart
Created Mar 14, 2021
Gist for Blogger api in Flutter Post
View post_list.dart
class PostList {
String kind;
String nextPageToken;
String prevPageToken;
List<Items> items;
PostList({this.kind, this.nextPageToken, this.prevPageToken, this.items});
PostList.fromJson(Map<String, dynamic> json) {
kind = json['kind'];
View flutter-embed-sample.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: Home()));
}
class Home extends StatefulWidget {
@override
_HomeState createState() => _HomeState();
}
@mukhtharcm
mukhtharcm / git_submodules.md
Created Jul 18, 2020 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation
View git_submodules.md

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@mukhtharcm
mukhtharcm / redirecting-github-pages.md
Created Jul 13, 2020 — forked from domenic/redirecting-github-pages.md
Redirecting GitHub pages after a repository move
View redirecting-github-pages.md

Redirecting GitHub Pages after a repository move

The problem

You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.

However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.

The solution