This file contains hidden or 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'; | |
| class GridFabView extends StatefulWidget { | |
| @override | |
| _GridFabViewState createState() => _GridFabViewState(); | |
| } | |
| class _GridFabViewState extends State<GridFabView> { | |
| @override | |
| Widget build(BuildContext context) { |
This file contains hidden or 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
| //https://stackoverflow.com/questions/61263795/flutter-raisedbutton-stays-null | |
| import 'package:flutter/material.dart'; | |
| class FormValidationView extends StatefulWidget { | |
| @override | |
| _FormValidationViewState createState() => _FormValidationViewState(); | |
| } | |
| class _FormValidationViewState extends State<FormValidationView> { | |
| TextEditingController _userNameController; |
This file contains hidden or 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
| Future<T> _reAuthenticate<T>(GenericRequestObject request) async { | |
| var remainingTries = MAX_REMAINING_LENGTH; | |
| do { | |
| remainingTries--; | |
| try { | |
| return await request.fetch(); | |
| } on ErrorModel catch (e) { | |
| if (e.statusCode == 401) { | |
| final response = await refreshToken(); | |
| SharedManager().token = response.data.token; |
This file contains hidden or 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
| main(List<String> args) { | |
| final userId = 1000; | |
| // dumyy add item | |
| List<EtkinlikOturum> datas = []; | |
| for (var i = 0; i < 1000; i++) { | |
| datas.add(EtkinlikOturum(id: i, etkinlikOturumDetay: [ | |
| EtkinlikOturumDetay(etkinlikOturumDetayChild: [ | |
| EtkinlikOturumDetayChild(uyeId: i % 10 == 0 ? 1000 : i) | |
| ]) | |
| ])); |
This file contains hidden or 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
| class ShoppiDioService with DioMixin implements Dio { | |
| static ShoppiDioService _instance; | |
| String baseUrl; | |
| static ShoppiDioService get instance { | |
| if (_instance == null) { | |
| _instance = ShoppiDioService._init(); | |
| } | |
| return _instance; | |
| } |
This file contains hidden or 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
| const mongoose = require('mongoose'); | |
| var productSchema = new mongoose.Schema({ | |
| title: { | |
| type: String, | |
| required: true, | |
| unique: true, | |
| index: true, | |
| }, | |
| image: { |
This file contains hidden or 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
| var express = require('express'); | |
| var router = express.Router(); | |
| var Joi = require('joi'); | |
| const Product = require('../models/product'); | |
| const httpStatusCode = require('http-status-codes'); | |
| const productPath = "/product"; | |
| router.get(productPath, (req, res) => { | |
| Product.find((err, products) => { |
This file contains hidden or 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
| const mongoose = require("mongoose"); | |
| const bodyParser = require('body-parser'); | |
| const httpStatusCode = require('http-status-codes'); | |
| var cors = require('cors'); | |
| var app = require('express')(); | |
| const router = require('express').Router(); | |
| const port = process.env.PORT || 4000; | |
| const socketConstants = require('./constants/socket_constants'); |
This file contains hidden or 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
| class ShoppiDio with DioMixin implements Dio { | |
| static ShoppiDio _instance; | |
| static ShoppiDio get instance { | |
| if (_instance == null) { | |
| _instance = ShoppiDio._init(); | |
| } | |
| return _instance; | |
| } |
This file contains hidden or 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
| abstract class ProductViewModel extends BaseState<Product> { | |
| IO.Socket socket = IO.io(AppConstants.SOCKET_URL); | |
| final TextEditingController textEditingController1 = TextEditingController(); | |
| final TextEditingController textEditingController2 = TextEditingController(); | |
| List<ProductModel> products = []; | |
| GlobalKey<ScaffoldState> scaffoldKey = GlobalKey(); | |
| ProductService service = ProductService(); |