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
Scaffold( | |
appBar: AppBar( | |
title: const Text('Jira Board'), | |
), | |
body: Column( | |
children: [ | |
Expanded( | |
child: Row( | |
children: [ | |
Expanded( |
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:shared_preferences/shared_preferences.dart'; | |
class Prefs { | |
static SharedPreferences _prefs; | |
// call this method from iniState() function of mainApp(). | |
static Future<SharedPreferences> init() async { | |
_prefs = await SharedPreferences.getInstance(); | |
return _prefs; |
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(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
static const String _title = 'Flutter Code Sample'; | |
@override |
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:http/http.dart' as http; | |
const String _host = "https://<....>"; | |
class MyRequest { | |
final String url; | |
final Map<String, String> headers = {'Authorization': 'Bearer token'}; |
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
BlockQuote( | |
child: | |
Text( | |
'Lorem ipsum dolor sit amet, is the best place to hide a text.', | |
textAlign: TextAlign.justify, | |
), | |
), |
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
BlockQuote( | |
outerPadding: const EdgeInsets.all(20), | |
blockColor: Colors.blueAccent, | |
blockWidth: 5, | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
children: [ | |
Text( | |
'Lorem ipsum dolor sit amet, is the best place to hide a text.', | |
textAlign: TextAlign.justify, |
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
<?php | |
require_once __DIR__ . '/response.php'; | |
require_once __DIR__ . '/db.php'; | |
class CRUD | |
{ | |
private $db; | |
public function __construct() |
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
function decodeJson($json, $assoc = false) | |
{ | |
$json = preg_replace('/[\x00-\x1F\x7F]/u', '', $json); | |
$ret = json_decode($json, $assoc); | |
if ($error = json_last_error()) { | |
$errorReference = [ | |
JSON_ERROR_DEPTH => 'The maximum stack depth has been exceeded.', | |
JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON.', | |
JSON_ERROR_CTRL_CHAR => 'Control character error, possibly incorrectly encoded.', | |
JSON_ERROR_SYNTAX => 'Syntax error.', |
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
<?php | |
function err($err) | |
{ | |
$res['state'] = false; | |
$res['err'] = $err; | |
echo json_encode($res); | |
die(); | |
} |
NewerOlder