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
defmodule NoReactWeb.StatefulComponentLive do | |
use Phoenix.LiveView | |
def render(assigns) do | |
~L""" | |
<div> | |
Seconds <%= @seconds %> | |
</div> | |
""" | |
end |
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
defmodule NoReactWeb.Router do | |
use NoReactWeb, :router | |
pipeline :browser do | |
plug :accepts, ["html"] | |
plug :fetch_session | |
plug :fetch_flash | |
plug Phoenix.LiveView.Flash | |
plug :protect_from_forgery | |
plug :put_secure_browser_headers |
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_web/material.dart'; | |
import 'package:flutter_web/widgets.dart'; | |
class SlideThree extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Row( | |
children: <Widget>[ | |
Container( |
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_web/material.dart'; | |
import 'package:flutter_web/widgets.dart'; | |
class SlideTwo extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Stack( | |
children: <Widget>[ | |
Container( |
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_web/material.dart'; | |
import 'package:flutter_web/widgets.dart'; | |
class SlideOne extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Container( | |
width: MediaQuery.of(context).size.width, | |
color: Color(0xfff7c143), |
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_web/material.dart'; | |
// import 'package:slides/slides/slide.dart'; | |
import 'package:slides/slides/slide_one.dart'; | |
import 'package:slides/slides/slide_three.dart'; | |
import 'package:slides/slides/slide_two.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. |
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
[ | |
{ | |
"family": "Calibri", | |
"fonts": [ | |
{ | |
"asset": "fonts/calibri.ttf" | |
} | |
] | |
} | |
] |
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'; | |
import 'package:scoped_model/scoped_model.dart'; | |
import 'package:wecode_state/scoped/slider.dart'; | |
class ScopedExample extends StatefulWidget { | |
@override | |
_ScopedExampleState createState() => _ScopedExampleState(); | |
} | |
class _ScopedExampleState extends State<ScopedExample> { |
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:scoped_model/scoped_model.dart'; | |
class SliderModel extends Model { | |
double _sliderValue = 0.0; | |
double get sliderValue => _sliderValue; | |
void updateSlider(double value) { | |
this._sliderValue = value; | |
notifyListeners(); | |
} |
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
void _onSelectedState(String value) { | |
setState(() { | |
_selectedLGA = "Choose .."; | |
_lgas = ["Choose .."]; | |
_selectedState = value; | |
_lgas = List.from(_lgas)..addAll(repo.getLocalByState(value)); | |
}); | |
} |